Thanks for stopping by to let us know something could be better!
gcs_object.signed_url( method: "GET", expires: 5 * 60, issuer: issuer, signer: signer, version: :v4 )
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Details>No such object: bucket_name/folder1/id,+firstn,+lastn/image1.jpeg</Details>
</Error>
With V4 unable to convert special char + to '%20 hence getting above error.
gcs_object.signed_url( method: "GET", expires: 5 * 60, issuer: issuer, signer: signer, version: :v2 )
When using version V2, Able to download the image.
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
Can you try upgrading to version 1.29.0? It includes this fix provided by @cfactolerin.
upgraded to gem 'google-cloud-storage', '1.29.0'
Still same issue
Hi @quartzmo I think my fix did not include this unfortunately. What i fixed was only the query params when we wanted to have a different file name during downloading of the file. I saw another CGI.escape here.
This however might involve business decisions already because this means that before signer v4, cloud storage is allowing spaces on the file names. Now, the file path actually includes + instead.
@chvreddy Thank you for reporting this bug. It looks like the path in v4 should use %20 for spaces, so I expect I will be able to publish a fix. I'm currently requesting an update to the shared conformance tests for this feature in order to specify the behavior in those tests.
Thanks @quartzmo