以编程方式从共享Dropbox文件夹链接下载内容 [英] Programmatically Download Content from Shared Dropbox Folder Links

查看:85
本文介绍了以编程方式从共享Dropbox文件夹链接下载内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在构建一个应用程序,以自动触发下载与用户共享的Dropbox文件(共享文件/文件夹链接)。如此处所述,这是直接实现Dropbox到文件的链接的实现。


不幸的是,这不适用于共享文件夹。任何人都对我如何提供建议




  • 下载所有内容(也许可以获取其中的文件链接列表)下载?)


  • 下载文件夹的压缩文件



当前,我可以转到url并进行一些屏幕抓取以尝试获取内容列表,但是链接的Dropbox博客条目中描述的文件解决方案的优点是不需要抓取,因此更可靠,更高效。


解决方案

Dropbox的支持团队为我提供了最佳解决方案:



只需在共享链接的末尾添加?dl = 1



因此,如果与用户共享的链接是 https://www.dropbox,则会为您提供共享文件夹的压缩版本。



.com / sh / xyz / xyz-YZ (或类似名称,链接到共享文件夹),以下载该文件夹的压缩版本,只需访问 https:// www .dropbox.com / sh / xyz / xyz-YZ?dl = 1



希望这对其他人也有帮助。


I'm building an application to automatically trigger a download of a Dropbox file shared with a user (shared file/folder link). This was straight forward to implement for Dropbox links to files, as is outlined here.

Unfortunately this doesn't work for shared folders. Anyone have suggestions on how I could

  • Download the all of it's contents (maybe get a list of the files links inside it to download?)
  • or
  • Download a zip of the folder

Currently I can go to the url and do some screen-scraping to try and get the contents list, but the advantage of the solution described in the linked Dropbox blog entry for files is that no scraping is needed, so it's much more reliable and efficient.

解决方案

Dropbox's support team just filled me in on the best way to do this:

Just add ?dl=1 to the end of the shared link. That'll give you a zipped version of the shared folder.

So if the link shared with a user is https://www.dropbox.com/sh/xyz/xyz-YZ (or similar, which links to a shared folder), to download a zipped version of that folder just access https://www.dropbox.com/sh/xyz/xyz-YZ?dl=1

Hope this helps someone else also.

这篇关于以编程方式从共享Dropbox文件夹链接下载内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆