Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 398
Uchenna Avatar asked Oct 08 '22 02:10

Uchenna


1 Answers

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 :)

like image 179
Steve Bazyl Avatar answered Oct 13 '22 09:10

Steve Bazyl