In the Amazon S3 SDK, when generating a presigned URL, I can generate a URL setting the content-disposition, but I cannot find a similar way of configuring these options using Google.
The method call available to us is:
https://www.rubydoc.info/gems/google-cloud-storage/0.20.0/Google/Cloud/Storage/File#signed_url-instance_method
I am trying to upload a file directly to a Google bucket and not via my Rails server, and want to set the content-disposition of the file being uploaded via the presigned URL. Is there a way of doing this? Is there a way of setting object meta data via a presigned URL?
require "google/cloud"
gcloud = Google::Cloud.new
storage = gcloud.storage
bucket = storage.bucket "my-todo-app"
file = bucket.file "avatars/heidi/400x400.png"
shared_url = file.signed_url
# The parameters it takes is: signed_url(method: nil, expires: nil, content_type: nil, content_md5: nil, issuer: nil, client_email: nil, signing_key: nil, private_key: nil)
# how do we add content_disposition?
# how do we add object meta data?