-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
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
storage/file#getSignedUrl example for uploading to signed URL fails #1312
Comments
Bug caught, PR sent: #1313! When
|
Thanks @stephenplusplus! PUT doesn't quite work for me either, although it fails in a different way. If I try
If I try to PUT via XMLHttpRequest, it fails differently:
Resulting in the following response:
It would be great if you could help me figure out what goes wrong here. |
I figured out that the reason that XMLHttpRequest fails is that it sends a |
@stephenplusplus I have another question though. How do I ensure that a file created through uploading via a signed URL is publicly readable? See my Stack Overflow question on this. |
I believe you can use the extension headers option: https://googlecloudplatform.github.io/gcloud-node/#/docs/v0.33.0/storage%2Ffile?method=getSignedUrl See https://cloud.google.com/storage/docs/access-control/signed-urls#about-canonical-extension-headers looks like maybe "x-goog-acl: public" |
@stephenplusplus How do I set |
@stephenplusplus I think there is a bug when supplying
You'll see that |
@stephenplusplus I created an issue on the matter, with accompanying PR. |
Source-Link: googleapis/synthtool@8d2c953 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:5ed10ba99cd1ea8c3a0f29b4c53e8a2723a101952705baed6b61783111c64c1c Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
I cannot upload to signed URLs generated by storage/file#getSignedUrl. I've even tried implementing the official example from the documentation and it fails:
The status code from POSTing to the file is 400, with the message
<?xml version='1.0' encoding='UTF-8'?><Error><Code>InvalidPolicyDocument</Code><Message>The content of the form does not meet the conditions specified in the policy document.</Message><Details>Missing policy</Details></Error>%
.The text was updated successfully, but these errors were encountered: