Upload files from dropbox/box account to my server using an iphone app

你说的曾经没有我的故事 提交于 2019-12-11 07:57:44

问题


I have an api to upload files to my server. I need to make iphone an app to transfer files from dropbox to my server.

My question is Do I necessarily need to download the files from dropbox/box account to iphone and then upload to my server using my api?

Or Can I skip the part of downloading the files to the device and directly upload from a dropbox/box account to my custom server?

Or Optionally keep only few files in sync between the iphone and dropbox, and upload the local copy of file to my server?

Or is there any other way of doing it?

Thanks in advance.


回答1:


If the user has authorized the Dropbox API app on the iPhone app itself, and so the Dropbox API access token resides there, one solution is to have the iPhone app make an API call to /media (in the official Dropbox iOS Core SDK this is loadStreamableURLForFile). This will return a temporary direct link to the file contents. You can then pass that link to your server and do the downloading there.



来源:https://stackoverflow.com/questions/24948852/upload-files-from-dropbox-box-account-to-my-server-using-an-iphone-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!