We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to set cache control, but it's not working
my bucket cors.
[ { "origin": ["*"], "responseHeader": ["Content-Type", "access-control-allow-origin","Authorization", "Cache-Control"], "method": ["GET", "HEAD", "DELETE", "PUT", "POST"], "maxAgeSeconds": 3600 } ]
I tried to set the cache-control while getting signed URL but then the image is not uploading.
Here is my front-end code
here using /api/product/image i am getting the singed URL and then pushing the image
/api/product/image
axios.get(`/api/product/image`, { params: { fileName: newImage.file.name } }).then((result) => { let imageForm = result.data let data = new FormData(); data.append("key", imageForm.key); data.append("bucket", imageForm.bucket); data.append("GoogleAccessId", imageForm.GoogleAccessId); data.append("signature", imageForm.signature); data.append("policy", imageForm.policy); data.append("content-type", imageForm["Content-Type"]); data.append("file", newImage.file); let config = { headers: { 'Content-Type': 'multipart/form-data', 'Access-Control-Allow-Origin': '*' } } axios.post("https://" + imageForm.bucket + ".storage.googleapis.com", data, config).then((gresult) =>
If I set cache-control here in the headers field, then it's not working.
headers
A StackOverflow question asking the similar problem, still unresolved
The text was updated successfully, but these errors were encountered:
Sorry, I don't have the time to maintain this code. It is has been a long time since I looked at it.
Sorry, something went wrong.
No branches or pull requests
I am trying to set cache control, but it's not working
my bucket cors.
I tried to set the cache-control while getting signed URL but then the image is not uploading.
Here is my front-end code
here using
/api/product/image
i am getting the singed URL and then pushing the imageIf I set cache-control here in the
headers
field, then it's not working.A StackOverflow question asking the similar problem, still unresolved
The text was updated successfully, but these errors were encountered: