We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
A.L
11 years agoNew member | Level 1
Drop-in Saver
Hey guys,
I'm struggling to implement a single drop-in saver button on a blank html document running from local host.
I tried copying the dropins.js and referencing it locally but am unsure what...
Steve M.
Dropbox Staff
11 years agoLots of things about that code look weird. Try this instead:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Saver</title>
<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="kyljf8vcbai3kc7"></script>
</head>
<body>
<a href="https://dl.dropboxusercontent.com/s/deroi5nwm6u7gdf/advice.png" class="dropbox-saver">Click here to save.</a>
</body>
</html>
I changed a few things:
- I put the script tag in the head and closed it.
- I put some text inside the anchor tag so you could click the link. (I also moved the anchor tag outside of the
<script>wrapper so it actually shows up.) - I removed the call to
createSaveButton, which referenced two undefined variables (localhostandfilename) and didn't do anything with the button anyway.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
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!