简体   繁体   English

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

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

I have an api to upload files to my server. 我有一个api将文件上传到服务器。 I need to make iphone an app to transfer files from dropbox to my server. 我需要使iphone成为一个应用程序,以将文件从保管箱传输到我的服务器。

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? 我的问题是我是否需要从Dropbox / Box帐户将文件下载到iPhone,然后使用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? 还是可以跳过将文件下载到设备的过程,而直接从Dropbox / Box帐户上传到我的自定义服务器?

Or Optionally keep only few files in sync between the iphone and dropbox, and upload the local copy of file to my server? 还是可以选择在iPhone和保管箱之间仅同步几个文件,然后将文件的本地副本上传到我的服务器?

Or is there any other way of doing it? 还是有其他方法可以做到?

Thanks in advance. 提前致谢。

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 ). 如果用户已经在iPhone应用程序本身上授权了Dropbox API应用程序,因此Dropbox API访问令牌驻留在此处,则一种解决方案是让iPhone应用程序对/ media进行API调用(在正式的Dropbox iOS Core SDK中,这是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. 然后,您可以将该链接传递到服务器并在那里进行下载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM