problem with wavesurfer.js playing an mp3 file from Digital Ocean Spaces (S3 service)
$30-250 CAD
Cerrado
Publicado hace alrededor de 3 años
$30-250 CAD
Pagado a la entrega
I am using [login to view URL] to play an mp3 file (and build/show the waveform) on a webpage.
It works fine when the mp3 file is on my website (on domain)
But it does not work when I use the exact same mp3 file from Digital Ocean Spaces (and S3 service)
I have set up the CORS requirements and the file downloads ok to the browser and there is no CORS error/rejection in Chrome ....
But, [login to view URL] will not load and play the mp3
I am committed to using [login to view URL] as the music/waveform tool, BUT I need it to work from DO SPACES
I have a simple test page set up that shows that [login to view URL] works fine using the mp3 file on my site, and does NOT work from the DO Spaces file
It appears that the issue may be that the file I have uploaded to the Digital Ocean Spaces (S3)
The upload is done with Python using the requests library:
Here is the code for the upload:
This function is called with these params:
thisNewKey = the full path and filename to store it on the S3 as
sourceFN = the local path to the file being uploaded
ContentType = 'audio/mpeg'
presignedURL = the url pulled back from the S3 to upload to
The file upload goes successfully and the file shows in the DO Spaces S3 portal
However, the file will not load on my web-page (middle link)
I also uploaded an mp3 file via the upload button on the DO SPACES S3 portal ..
That file works on my test web page - the right link
This likely means that my upload code is producing a resulting uploaded file that the [login to view URL] audio component is not able to use
# ============================================================================
def S3_UploadFilePreSigned( thisNewKey, sourceFN, ContentType, presignedURL):
res = True
txt = 'Ok'
try:
headers = {'Content-Type': ContentType}
fileobj = open(sourceFN, 'rb')
http_response = [login to view URL](presignedURL, headers=headers, files={'file': (thisNewKey, fileobj)})
[login to view URL]()
if [login to view URL] == False:
res = False
txt = [login to view URL]
except Exception as PE:
print (PE)
res = False
return res, txt
# ============================================================================
Hi there,
★★★ JavaScript Expert ★★★ 6+ Years of Experience ★★★
I've read requirements and ready to debug & fix errors on your website.
What we can do for you:
✔️ Add features in existing app.
✔️ Create rest api.
✔️ Convert javascript code into typescript.
✔️ Fix bugs in javascript, jQuery, nodeJS, typescript and reactJS.
and anything else you want.
I'll be glad to discuss project before start so let's chat.
Thanks for your consideration.
Best Regards,
TechPlus Team
Hello, How are you.
I have read your suggestion carefully. I am an expert in python, downloading video.
I have 5 years experience working in these job.
I can give you the perfect results with this project.
Please chat with me for more discussion.
Thanks and regards.