alexbevi / redmine_dropbox_attachments

Use Dropbox as the storage backend for your Redmine installation
23 stars 10 forks source link

Dropbox API v1 deprecated #27

Open VoronyukM opened 7 years ago

VoronyukM commented 7 years ago

Hello!

Today our we was surprised that this awesome plugin not work and cause an error:

at=info method=GET path="/attachments/download/3655/Image.166987779614.png" ... protocol=https
 Completed 500 Internal Server Error in 295.4ms
 Dropbox::API::Error::BadInput (400 - Bad input parameter - v1_retired):
   vendor/bundle/ruby/2.0.0/gems/dropbox-api-0.4.2/lib/dropbox-api/connection/requests.rb:15:in `request'
   vendor/bundle/ruby/2.0.0/gems/dropbox-api-0.4.2/lib/dropbox-api/connection/requests.rb:59:in `get'
   vendor/bundle/ruby/2.0.0/gems/dropbox-api-0.4.2/lib/dropbox-api/client/raw.rb:27:in `request'
   (eval):3:in `metadata'
   vendor/bundle/ruby/2.0.0/gems/dropbox-api-0.4.2/lib/dropbox-api/client.rb:21:in `find'
   plugins/redmine_dropbox_attachments/lib/redmine_dropbox/attachments_controller_patch.rb:27:in `redirect_to_dropbox'
   plugins/redmine_dropbox_attachments/lib/redmine_dropbox/attachments_controller_patch.rb:83:in `prepare_dropbox_redirect'

I suppose that the reason of the error that the Dropbox API v1 finally turned off yesterday:

https://blogs.dropbox.com/developers/2016/06/api-v1-deprecated/

September 28, 2017: API v1 endpoints are turned off.

Are there any plans to upgrade this plugin to Dropbox API v2?

bprotas commented 7 years ago

@VoronyukM -

I've spiked on something very quick to use the V2 API in this plugin, because I missed the turn-off announcement and my redmine install is down so just had to get something going. If you want to look at what I've done, you can see my fork at https://github.com/bprotas/redmine_dropbox_attachments .

bprotas commented 7 years ago

For those interested, I've created a PR for my attempt at V2 API support in #28 .

VoronyukM commented 7 years ago

@bprotas Hi Ben! Your patch works like a charm. Many thanks!!!

yukoff commented 7 years ago

Hi guys, sorry for being late with this deprecation - was busy with other things. @bprotas, thanks for the patch, much appreciated! I'll get back to this in a few days - I think there shouldn't be any issues, however it should be check with all supported versions of redmine. And thanks for the feedback, @VoronyukM!