Reputation: 5866
How do you get html files in dropbox to open in a new window as an application, rather then opening it in the preview window. AgileBits the creators of 1Password for mac have a html page that they upload to dropbox and when open on dropbox's website it opens in a new tab and runs directly from your dropbox as an application.
I have tried a number of things and have not been able to recreate this, nor can I find any documentation on dropbox that says how to do it. If I take there html file and copy it, it works as expected. If I copy the content of the html into a new file, it only opens in a preview window. If I rename there file it no longer works, I search around for hidden .files and messed around with those but none of them seem to affect anything.
Upvotes: 2
Views: 2947
Reputation: 158
You want to open the https://dl-web.dropbox.com/get/*folders*/*file.ext*?_subject_uid=*9999999*&w=*abcdefghijklmnopqrstuvwxyzABCDEFGHIJK123456789*
link for a non-public folder file (rather than the https://www.dropbox.com/home/*folders*?preview=*file.ext*
link). This is actually the link for the anchor tag for the file in the file list on the web, but clicking on most opens the files in preview mode (still not sure why ones named "1password.html" are exempt). To open the non-preview link you can Shift-Right-Click, to get the browser right click menu instead of the Dropbox one, and just chose "Open in new tab/window".
Using the 1password.html file as a guide it looks like you can load separate scripts/files using ajax. They embed all CSS and images in the HTML file (images using base64).
Edit: It looks like Dropbox provides special functionality to 1password. Other non-public pages can not load scripts/data from the same folder tree (error 403). Even renaming the 1password.agilekeychain folder and breaks its functionality.
Upvotes: 0
Reputation: 4276
It might be just me but I think your question is phrased badly, however if I understand you correctly you want to essentially HOST a webpage/site from DropBox.
This is still possible, despite them phasing out the public folder in Aug 2012.
New accounts registered after this date need to manually enable the public folder by going here: http://www.dropbox.com/enable_public_folder
Inside the Public folder you can store almost anything (including HTML files) that can be accessed directly with an absolute URL.
Upvotes: 2