Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
When I upload a picture or video to a dropbox folder that is a subfolder sorted into days within an umbrella folder (manually - only a couple a day) - how do I automatically embed the most recent .jpg/.mp4 of any of the subfolders into the website. Purely displaying the image or video itself and not the list of what is in the folder. Many thanks (don't understand any of the API stuff so some HTML code that I can change account details within or something simple would be super appreciated)
@samuelar wrote:
don't understand any of the API stuff so some HTML code that I can change account details within or something simple would be super appreciated
There isn't a way to do what you want with just HTML code, and there's no way to embed your account details in any code so it connects to Dropbox. Assuming it's even possible, you'd probably need to use the API and create your own code to do what you want. There's no way to do it with the regular Dropbox functionality.
Oh ok, so now im trying to use embedder in my squarespace site: REDACTED using this folder link: REDACTED PRIVACY and the code found in the support article below but it isn't working, if this isn't to be work, can you embed the folder using HTML?
Triggering the Embedder using JavaScript
Another way to use the Embedder is to embed content into a specific element using the JavaScript method Dropbox.embed(options, element). This approach can be particularly useful if you’re trying to create embedded content dynamically.
The options object must contain a link and may optionally define file settings and folder settings.
An example folder embed:
var options = { // Shared link to Dropbox file link: "REDACTED", file: { // Sets the zoom mode for embedded files. Defaults to 'best'. zoom: "best" // or "fit" }, folder: { // Sets the view mode for embedded folders. Defaults to 'list'. view: "list", // or "grid" headerSize: "normal" // or "small" } } Dropbox.embed(options, element);
By modifying these parameters, you can change the embedded content and the behavior of the Embedder:
The snippet above embeds a preview of a Dropbox folder in list view:
im trying to use embedder in my squarespace site: REDACTED using this folder link: REDACTED and the code found in the support article below but it isn't working, if this isn't to be work, can you embed the folder using HTML? If anyone could provide the code that I can just replace links in and is fit to run that would be great. Many, many thanks
Triggering the Embedder using JavaScript
Another way to use the Embedder is to embed content into a specific element using the JavaScript method Dropbox.embed(options, element). This approach can be particularly useful if you’re trying to create embedded content dynamically.
The options object must contain a link and may optionally define file settings and folder settings.
An example folder embed:
var options = { // Shared link to Dropbox file link: "REDACTED", file: { // Sets the zoom mode for embedded files. Defaults to 'best'. zoom: "best" // or "fit" }, folder: { // Sets the view mode for embedded folders. Defaults to 'list'. view: "list", // or "grid" headerSize: "normal" // or "small" } } Dropbox.embed(options, element);
By modifying these parameters, you can change the embedded content and the behavior of the Embedder:
The snippet above embeds a preview of a Dropbox folder in list view:
To use the embedder, you will first need to create an app via the App console. With that you'll need the App Key that is located in the app console.
From there you'll want to insert this javascript:
<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="[YOUR APP KEY]"></script>
Replacing [YOUR APP KEY] with the app key from your App console.
From there you can use the following html:
<a href="[CONTENTS SHARED LINK]" class="dropbox-embed" ></a>
I tried this recommendation from Tahsini but all I get is this.
It tries to load an iframe which is blocked.
@Hawkeye00 To use the Dropbox Embedder, make sure you've registered the domain(s) of your site(s) where you want to use it. You can find more information in the Dropbox Embedder documentation. You can register your "Chooser / Saver / Embedder domains" from your app's page on the App Console.
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!