You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @markevans, I hope all is going well in the leadup to Christmas :)
I'm looking to download files from Google Drive via dragonfly. They'll be specified by the user using the Google Drive file picker tool that returns a file_id and oauth_token. I can send these back to the server and have Dragonfly download the file from there. The trouble is that to download the file, the oauth token needs to be specified in a header:
GET https://www.googleapis.com/drive/v3/files/0B9jNhSvVjoIVM3dKcGRKRmVIOVU?alt=media
Authorization: Bearer <ACCESS_TOKEN>
I've had a look at the code and it appears specifying extra headers isn't currently supported. Would you be interested in having this as a feature? or do you think there's another way to do this?
I guess the biggest challenge would be working out a tidy way to pass in the extra headers. Perhaps passing a hash to the assignment method that contains say:
hi - I'd be reluctant to change anything with the model.image_url= method as this is just a convenience method that will get complicated if adding extra stuff. The place to do it would be in fetch_url. You could do
Hi @markevans, I hope all is going well in the leadup to Christmas :)
I'm looking to download files from Google Drive via dragonfly. They'll be specified by the user using the Google Drive file picker tool that returns a
file_id
andoauth_token
. I can send these back to the server and have Dragonfly download the file from there. The trouble is that to download the file, the oauth token needs to be specified in a header:See: https://developers.google.com/drive/api/v3/manage-downloads
I've had a look at the code and it appears specifying extra headers isn't currently supported. Would you be interested in having this as a feature? or do you think there's another way to do this?
I guess the biggest challenge would be working out a tidy way to pass in the extra headers. Perhaps passing a hash to the assignment method that contains say:
would work? I'd be keen to get onto this asap, so if you had any ideas or pointers before I begin that would be really helpful :)
The text was updated successfully, but these errors were encountered: