Hello,
I'm encountering a problem while trying to obtain the content URL of a file. Specifically, when I use a shared link to fetch a file, I receive a 302 response but i encounter CORS issues. This prevents me from following the redirect to obtain the file's content URL i guess. I don't face this issue when using curl or Python.
Below, the sequence of API calls I'm making. I followed this post :
- sharingGetSharedLinkMetadata
- filesListFolder
- sharingGetSharedLinkFile
- fetchSharedLinkFileUrl (In this step, i'm using fetch and replacing dl=0 with dl=1 in the file url but i'm facing Cors issues)
Could you provide any insights or recommendations on how to successfully retrieve the file content URL ? The URL format I'm dealing with is:
https://*.dl.dropboxusercontent.com/cd/0/get/*/file?dl=1#.
My goal is to load an audio file into a JavaScript audio player. The HTML5 audio player can handle redirects without any issues, libraries like wavesurfer.js cannot, resulting in CORS problems. The only method I've found successful for loading audio files into wavesurfer is by using the direct dropboxusercontent URL. You can see this in action on their playground: https://wavesurfer.xyz/examples/?basic.js.
Best regards,