def passport_upload doc
# begin
app_key = ENV['WINGBE_DROPBOX_APP_KEY_DEVELOPMENT']
app_secret = ENV['WINGBE_DROPBOX_APP_SECRET_DEVELOPMENT']
p "=========#{app_key}===#{app_secret}========="
flow = DropboxOAuth2FlowNoRedirect.new(app_key, app_secret)
authorize_url = flow.start()
client = DropboxClient.new(ENV['WINGBE_DROPBOX_ACCESS_TOKEN_DEVELOPMENT'])
file = open(params[:doc])
file_name = params[:doc].original_filename
response = client.put_file(file_name, file)
# response = client.put_file('file_name', open('file'))
client.shares(response['path'])
# rescue
# end
end
通過上傳於Dropbox的期運用的Dropbox API的任何文件有錯誤的Dropbox {「錯誤」:「v1_retired」 }如何解決它。如何解決的Dropbox {「錯誤」:「v1_retired」}對Dropbox的API在Ruby on Rails的
https://blogs.dropbox.com/developers/2017/09/api-v1-shutdown-details/ – Blorgbeard
是的,比在Dropbox上上傳文檔的任何備用解決方案 – manu
使用新的API。 – Blorgbeard