Discussions
Cors error from Amazon when programatically retrieving a created talk!?
Access to fetch at 'https://d-id-talks-prod.s3.us-west-2.amazonaws.com/auth0%7C6428b6821e6006b657eae3f9/tlk_9f4pmT2PaMpWL5RAEOSfo/1686995694017.mp4?AWSAccessKeyId=AKIA5CUMPJBIK65W6FGA&Expires=1687082107&Signature=5ZClhrw5q9PbpWDgr0uCz0lw8eU%3D&X-Amzn-Trace-Id=Root%3D1-648d82fb-0d3c02cb4974557f7b930a3c%3BParent%3Dcbc029d12919de39%3BSampled%3D1%3BLineage%3D6b931dd4%3A0' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
upload.js:87 GET https://d-id-talks-prod.s3.us-west-2.amazonaws.com/auth0%7C6428b6821e6006b657eae3f9/tlk_9f4pmT2PaMpWL5RAEOSfo/1686995694017.mp4?AWSAccessKeyId=AKIA5CUMPJBIK65W6FGA&Expires=1687082107&Signature=5ZClhrw5q9PbpWDgr0uCz0lw8eU%3D&X-Amzn-Trace-Id=Root%3D1-648d82fb-0d3c02cb4974557f7b930a3c%3BParent%3Dcbc029d12919de39%3BSampled%3D1%3BLineage%3D6b931dd4%3A0 net::ERR_FAILED 200 (OK)
this is the function i'm using to fetch the Video:
async function downloadUrl(url, filename) {
const options = {
method: "GET",
mode: "no-cors", // Add the "no-cors" mode option
};
const response = await fetch(url, options);
const data = await response.blob();
if (typeof window.navigator.msSaveBlob !== "undefined") {
// For Internet Explorer and Edge
window.navigator.msSaveBlob(data, filename);
} else {
// For other browsers
const downloadLink = document.createElement("a");
const fileUrl = URL.createObjectURL(data);
downloadLink.href = fileUrl;
downloadLink.download = filename;
downloadLink.click();
URL.revokeObjectURL(fileUrl);
}
}
export { downloadUrl };
Please respond to either owner account email ([email protected]) or my email ([email protected])
i really don't want to scrap the work and i like the platform but if we cant get this to work there's no reason to continue subscription :(
thank you