使用iPhone应用程序将文件从Dropbox / Box帐户上传到我的服务器

使用iPhone应用程序将文件从Dropbox / Box帐户上传到我的服务器

问题描述:

我有一个api将文件上传到服务器。我需要使iphone成为一个应用程序,以将文件从Dropbox传输到服务器。

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.

我的问题是
是否一定需要从Dropbox / box下载文件帐户到iphone,然后使用我的api上传到我的服务器?

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?

还是有选择地在iPhone和保管箱之间保持少量文件同步,然后将文件的本地副本上传到我的服务器?

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

或者还有其他方法吗?

预先感谢。

如果用户已在iPhone应用程序本身上授权了Dropbox API应用程序,因此Dropbox API访问令牌驻留在其中,则一种解决方案是让iPhone应用程序创建API调用 / media (在正式的Dropbox iOS Core SDK中,该 loadStreamableURLF orFile )。这将返回到文件内容的临时直接链接。然后,您可以将该链接传递到您的服务器,并在那里进行下载。

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.