How to directly upload files from browser to Google Cloud in Rails -


i have rails app allows users upload files. upload (via post) server, uses fog gem upload google cloud storage. problem files universally available knows url, want prevent.

so have 2 issues i'd solve:

  • i'd enable users upload google directly browsers
  • i'd prevent downloading files, users logged app

i have downloaded p12 file google api generated, i'm stuck. according documentation need generate key (done google-api-client gem) , signature (not done) , put post headers if understood correctly?

does has example use?

edit: got done, secret in interoperable storage access keys , sha1, google documentation doesn't say. i'll cover solution in blog post shortly.

here example of generating signed urls in python. details different in ruby, process same.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -