简体   繁体   English

让用户单击“保存到Dropbox”按钮,将某些内容加载到Dropbox的网页上

[英]Let user load some content on a web page on Dropbox with the click of a `Save to Dropbox` button

I'd like to enhance some web pages of my site by giving the user the ability to automatically load some content (for example an image) on his/her Dropbox by just the click of a Save to Dropbox button. 我想通过允许用户单击“ Save to Dropbox按钮来自动在其Dropbox上加载某些内容(例如图像)来增强网站的某些网页。

Just with the simple logic available from Facebook, gPlus, Pinterest. 仅凭Facebook,gPlus,Pinterest的简单逻辑即可。

Is it possibile? 有可能吗?

I explored the documentation but couldn't find and indication. 我浏览了文档,但是找不到和指示。

To let the user save in his/her Dropbox some files hostes on your web site you need the Saver 为了让用户在他/她的Dropbox中保存您网站上的某些文件,您需要保护程序

As the documentation states it is required to create a Dropbox app and obtain a data-app-key . 如文档所述,需要创建一个Dropbox应用并获取一个data-app-key

The web page has to load the Dropbox dropins JavaScript API. 该网页必须加载Dropbox dropins JavaScript API。

Finally adding a "Save to Dropbox" button Saver button just requires inserting a link: 最后添加“保存到Dropbox”按钮“保存Saver button只需要插入一个链接:

<a href="https://www.example.com/the-file-to-upload/a-default-filename" class="dropbox-saver"></a>

The Saver can also be triggered via JavaScript API allowing, for example, to design a custom button. 还可以通过JavaScript API触发Saver ,例如,允许设计自定义按钮。

Detailed reference is here https://www.dropbox.com/developers/saver 详细参考在这里https://www.dropbox.com/developers/saver

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

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