Aws s3 url is not working in chrome extension

135 views
Skip to first unread message

Prachi

unread,
Jul 31, 2023, 2:39:19 AM7/31/23
to Chromium Extensions
Hi,
I am fetching url through API in my chrome extension. Audio is working with normal https://domain.com/audiofilepath.mp3 but its not working with aws url example: https://s3.ap-south-1.amazonaws.com/bucketname/92a5aff9-f541-4d7b-a215-603959e3c8eb.mp3
It showing errors as
GET 403 Forbidden
DOMexception: Failed to load because no supported source was found

Could you help me with this?

Patrick Kettner

unread,
Aug 1, 2023, 2:14:41 AM8/1/23
to Prachi, Chromium Extensions
Can you share more of the code being used? Are you literally calling it via a `fetch`? Is this a content script? popup? offscreen document?

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/82881ca2-36db-4aae-be3c-425fe12b00ebn%40chromium.org.

Prachi

unread,
Aug 1, 2023, 5:44:22 AM8/1/23
to Chromium Extensions, Patrick Kettner, Chromium Extensions, Prachi
This is a popup. 

fetch("api url", requestOptions)
    .then(response => response.text())
    .then(result => {
        console.log(result);

getting the audio file URL in the result

Oliver Dunk

unread,
Aug 1, 2023, 6:05:46 AM8/1/23
to Prachi, Chromium Extensions, Patrick Kettner
Are you comfortable sharing the AWS url?

You can share it with me and Patrick privately if you want to avoid sharing it in public/potential bandwidth costs etc. :)
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB


Reply all
Reply to author
Forward
0 new messages