how to get URL uploaded doc on drop box. and how to store this URL our data base. this is the code
def passport_upload
app_key = ENV['APP_DROPBOX_APP_KEY_DEVELOPMENT']
app_secret = ENV['APP_DROPBOX_APP_SECRET_DEVELOPMENT']
flow = DropboxOAuth2FlowNoRedirect.new(app_key, app_secret)
authorize_url = flow.start()
client=DropboxClient.new(ENV['APP_DROPBOX_ACCESS_TOKEN_DEVELOPMENT'])
file = open(params[:doc])
file_name = params[:doc].original_filename
response = client.put_file(file_name, file)
end
this is the code how to find the url of uploded doc.
Aucun commentaire:
Enregistrer un commentaire