Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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 else I could try to get a single upload button working.
my code for reference:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title> Saver</title>
</head>
<body>
<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="kyljf8vcbai3kc7">
<a href="https://dl.dropboxusercontent.com/s/deroi5nwm6u7gdf/advice.png" class="dropbox-saver"></a>
Dropbox.createSaveButton(localhost, filename);
</script>
</body>
</html>
Lots 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:
<script>
wrapper so it actually shows up.)createSaveButton
, which referenced two undefined variables (localhost
and filename
) and didn't do anything with the button anyway.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!