Uchenna
Uchenna

Reputation: 4089

uploading to google drive with paperclip in Rails

Hello there i am new to using the google drive gem and i do not know how to use it with paperclip to upload photos to the google drive. Its a simple rails application that i am developing that uploads photos to google drive, is there any rails application example that i can use to get me started with the gem or can any body present an example here to aid we beginners using the google drive gem. Paperclip should be used to upload the files. Thank You

Upvotes: 5

Views: 2978

Answers (1)

Steve Bazyl
Steve Bazyl

Reputation: 11672

You'd likely have to implement a storage adapter for Paperclip. Take a look at something like https://github.com/dripster82/paperclipdropbox as an example. In that case, it looks like it only supports uploading to a single pre-authorized account. If that's OK, then modifying that to talk to Google Drive instead of Dropbox should be straightforward. If you need to support multiple users, you'd have to make sure the right credentials are being used for the current user.

Anyway, the paperclip docs are likely the best place to get started :)

Upvotes: 4

Related Questions