This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
Getting error when sending post request using signedUrl for resumable upload from front end.Getting CORS issue not getting sessionUrl #324
Unanswered
MOIN-AKHTAR
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone i'm using gcp bucket for resumable upload i have created an endpoint on backend whihc will give me a signedUrl.
BACKEND CODE:-
Now i want to use signedUrl given by this endpoint on front end for resumable upload.Now inorder to used it as resumable according to documetation we have to hit a post request using this signedUrl that will give us SessionUrl this session url will be used for resumable upload but when i'm hitting post request using signedUrl which i got from backed refer to above code i'm getting this error.
FRONT END CODE:-
Access to XMLHttpRequest at 'https://storage.googleapis.com/blahblahbla...' from origin 'http://localhost:3000/' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Than using gsutils my cors config is this:
[{"maxAgeSeconds": 3600, "method": ["GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS"], "origin": ["http://localhost:3000/"], "responseHeader": ["Content-Type", "Authorization", "x-goog-resumable", "Access-Control-Allow-Origin"]}]
Than why i'm getting this error any idea please
Beta Was this translation helpful? Give feedback.
All reactions