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
Useing dropbox api through upload the any file on dropbox got error Dropbox {“error”: “v1_retired”} How to resolve it.
Aucun commentaire:
Enregistrer un commentaire