You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
NJ-Gonzo
2 years agoExplorer | Level 3
Embedder opens a blank page with Error: appkey must be provided
Im trying to open a popup window with an embedded Dropbox folder when a user hits a button. When I hit the button, it opens a blank popup. When I turn on the Developer > Javascript console (in safa...
- 2 years ago
NJ-Gonzo wrote:... but I need a way to embed the dropbox folder on the page after they log in.
...
Hm.. All good, but what you're doing in code posted in OP doesn't meet "embed the dropbox folder on the page"! To be able embed something (your folder) somewhere (on any page including yours), you need to select place in the target page and embed there, not to open new page and try "embed" (if could be said so). There are 2 ways and which one is better depends on where you get your folder link (server side or client side). If you received the link on server side, it becomes easy - just put on the place where your folder should appear "a" tag with link put there. I.e. something like:
<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="xxxxxxxxxxxxxxx"></script> <a href="[@field:Digital_File_link]" class="dropbox-embed" data-height="800px" data-width="1200px"></a>
That's enough. 😉 The Dropbox' script will take care to replace the "a" node to content of the mentioned link ([@field:Digital_File_link]) automated.
If you're receiving link in dynamic way (after page load), then you have to use 'Dropbox.embed' when the link becomes available (cause you cannot embed it in page in advance as shown above). You still have to denote a place where your folder will appear (or create such in dynamic way). After the link is ready, you have to pass a reference to desired element (not a window!!!) to 'Dropbox.embed'. I.e. something like:
<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="xxxxxxxxxxxxxxx"></script> <div id="dropboxContainer" style="width: 1200px;height: 800px;"></div> ... var element = document.getElementById("dropboxContainer"); var options = {link: LinkID, folder: {view: "list", headerSize: "normal"}}; Dropbox.embed(options, element);
Hope it's a bit more clear now. 😉
Здравко
Legendary | Level 20
Hi NJ-Gonzo,
Hm..🤔 Why would you want to "embed" Dropbox link in a new window? What does actually mean embed here? 🧐
It would be more meaningful, I think, to just launch you link in the new window like following:
window.open(LinkID, '_blank', 'width=1200, height=800');
Don't you agree? 😉
Hope this helps.
NJ-Gonzo
2 years agoExplorer | Level 3
Thanks.
Perhaps I should explain more about what I am trying to do.
I have a video production business and I send my clients their finished files via dropbox. Normally I just send them the link and all is done. But I am trying to create a platform where my clients can login to my website and view their files on dropbox. I have designed the front end. (login etc...) but I need a way to embed the dropbox folder on the page after they log in.
Perhaps i'm over complicating things, but at least that was the idea... My research came up with using the embedder feature, which is where I am now, and where I am stuck.
thoughts?
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 4 days agoIf 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 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!