Open HTML files on Dropbox application

dropboxhtml

On my computer I'm developing some simple front-end web pages made of typical structure:

  1. HTML source code for structuring the elements;
  2. CSS classes linked to the HTML;
  3. JavaScript files linked to the HTML as well.

I put everything on a Dropbox folder and I'm so able to view all these files from my Dropbox application on the iPhone.

If I open the HTML files from there, I'm only able to see its basic HTML structure: no CSS is called, nor Javascript functions. Clearly because I'm not opening on a browser, but on a simple file viewer.

MY QUESTION: Is anyhow possible to open HTML files with a browser (such as Safari) from the iPhone so to be able to see the whole result (CSS, links and JavaScripts included)? I've already tried the "Open this file on…" function on Dropbox, but it doesn't show me Safari as an app that accepts that kind of file.

Thanks in advance.

Best Answer

If you try to accessing the files using the regular sharing feature the HTML file will fail to find it's linked CSS, JavaScript, etc files because of the way that Dropbox generates these sharing links.

However you should have a "Public" folder in your Dropbox. If you drop your files in there and select one you should see a "Copy public link..." option above the file list. If you use that, instead of the "Share" button then your HTML file should find it's linked files.

Illustration of Public folder in Dropbox

Related Question