How to get media URL?

Hi there :raised_hand_with_fingers_splayed:

The previous method demonstrated by Ed (Wix) on this post is no longer working.

let imageUrl =`${fileName}`;

This URL is now returning a Forbidden message. Any ideas?

Help is appreciated.

You should save the mediaId returned by the startUpload() function and then use the mediaId to get the URL from the wix media backend api

Thank you Shan, I’ll give it a try :blush:

Hey Ahmad,
Can you show me the URL that you are using.
The URL below worked for me. Check that you have the correct file name, which is not the nice user-friendly filename, but the ugly internal one.

It’s showing a Forbidden message on the page body.
I know that it’s not the nice friendly name.