如何使用DropBox API中的元数据加载图像 [英] How to load images using metadata from the DropBox API

查看:91
本文介绍了如何使用DropBox API中的元数据加载图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用DropBox API。使用POSTMAN,我已经成功检索了一个访问令牌,并且能够在我的保管箱中列出文件的元数据。我试图弄清楚如何使用该元数据使用javascript在网页上加载图像。是否有一个http调用来生成一个有效的url用作图像或视频元素的src参数?

I am getting just getting started with the DropBox API. Using POSTMAN, I have successfully retrieved an access token and have been able to list the metadata for files in my dropbox. I am trying to figure out how to use that metadata to load images on a web page using javascript. Is there an http call to generate a valid url to be used as the src parameter for an image or video element?

推荐答案

我认为你正在寻找 / media 端点: https://www.dropbox.com/developers/core/docs#media 。它会生成匿名读取的网址,最多可以使用四个小时。

I think you're looking for the /media endpoint: https://www.dropbox.com/developers/core/docs#media. It generates anonymous-read URLs that work for up to four hours.

更新

我不确定你是否使用dropbox.js,但那里的方法叫做 makeUrl

I'm not sure if you're using dropbox.js or not, but the method there is called makeUrl.

这篇关于如何使用DropBox API中的元数据加载图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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