📜 ⬆️ ⬇️

Dropbox - the simplest minihosting sites

As the comments to my blog showed , where I mentioned the method of hosting the site using only Dropbox, not everyone knows. That is, everyone knows that this is one of the most good products for file synchronization (moreover, it is used as a synchronization mechanism for applications), using Dropbox it is easy to publish your file, putting it in the Dropbox / Public folder, and then copying to it link (public link).

However, besides all this, Dropbox can act as the simplest hosting for your mini-projects.


Recipe

  1. Create a folder in the Dropbox / Public folder, say, Site.
  2. Create the files you need inside it, for example, index.html and style.css - yes, yes, Dropbox will correctly give them to the browser, and will not offer to save it to your computer. You can use html + css (+ of course javascript) + your data (pictures, xml, etc.). The most important thing is to use relative addressing, that is, say, to connect css-styles, you can simply write <link rel="stylesheet" href="style.css" type="text/css"/>
  3. Extract the public link to the main html using the context menu, for example, index.html. The link will look like dl.dropbox.com/u/1234567/Site/index.html , where 1234567 is a certain id associated with your account.
  4. In principle, everything is ready, it remains only to spice up your creation with a normal address. Since we use the free Dropbox, we also want to get a short, clear address quickly and for free. To do this, go to the site of any suitable abbreviation (I prefer tr.im ), where you can specify the desired abbreviated address. Voila, now your minisite is available at, say, http://tr.im/projectname. - service tr.im has long been not working. I liked the alternative proposed by Santiago26 : sn.im , which can also make a link with the desired text.

')

Amenities


Once the files are synchronized, they are already stored in the cloud, and your minisite becomes offline. In addition, it easily maintains habraeffekt (still, because it is written only with the help of html + css + js, that is, all scripts are executed on the user side, and the server is only concerned about uploading files). It is easy to fix something on the page or add something new - you just work with local files in your Dropbox folder, and they are sent to the server in the background (that is, you can not think about an ftp client).

And last but not least, the solution is equally suitable for users of different operating systems.

update: Permissions to access the file must be drwxr-xr-x (comment from TheMengzor ).

Source: https://habr.com/ru/post/83418/


All Articles