This page has been robot translated, sorry for typos if any. Original content here.

Install an HTTP server for file sharing

Often a situation begins at which time it is urgent to transfer a file to someone. What are the routes for solving this problem?

Transferring files by email is also a tedious task. Firstly, it’s time to multiply it safely by sending a couple: the data will first be transferred from you to the server, but then exactly the other way round - from the server to the receiver. Secondly, due to some features of the mail protocol, the size of the physically transmitted data will be 35% larger than the size of the original file. An ICQ network for file sharing requires a direct connection, and even setting the "Port Forwarding" function to NAT for various reasons does not always help to solve this problem. ICQ, yet, does not support downloading files.

You can put an FTP server, but for rare file transfers it is unreasonably difficult. Plus, if the customer is behind NAT, his software must be able to work in passive FTP mode.

There are still many programs for exchanging data, but they require use on both sides, therefore, to transfer files in this situation, we will consider using an HTTP server.

There are many different versions of HTTP servers, but HTTP File Server is ideal for solving our problem .
Download the second version of the application and run it (installation is by no means required).

The program interface is very unsophisticated and also intuitive. You simply drag and drop files into it, select the desired one and also inform the recipient of the link specified in the address bar. The recipient can save it by any standard means (for example, Internet Explorer).

But first you need to configure the Http File Server. Press the Easy / Expert Mode switch at the top of its window to switch to Expert mode. Today we choose the port on which our server will work. The standard port for HTTP is 80, it is allowed to leave it. But for some providers, the 80th input port is closed, while you need to specify any other free, for example, 16384. If you have a NAT router, then you need to specify the forward of the selected port on your computer similar to it. Please note that in the ON mode, the port cannot be changed; you must first press this button to switch to the OFF mode.

Then we drag the files that we want to transfer to someone into the Virtual File System window. You can drag and drop not only individual files, but also directories. For directories to eat a couple of trim options - Real is also Virtual.

We explain: for Real mode, all files that will also appear in the future will practically always be available, but Virtual allows you to edit the list of available objects.

Note that if you put a checkmark on Let browse in the context menu on the directory (including also the root directory "/"), the HTTP File Server will automatically generate a page with a list of files for the adventure, if the directory does not have index.htm.

Now it is allowed to give the user a link from the Address line (in the HTTP File Server) to the server itself or to a specific file.

If you give links to different files to different users, eat the likelihood that someone, simply typing the server address, will download all the laid out files. To avoid this, access rights are allowed. To do this, go to the menu "Menu -> Other options -> Users" and set the username / password for the user there.

Then, in the Virtual File System, on files that should by no means be accessible to anyone, left-click to bring up a context menu and also in the Restrict access field we mark the users who are allowed access to the file.

If you want the users to be able to upload some kind of file to you, you just need to drag the folder into the Virtual File System window and also indicate that it will become in Real mode. Users can upload files to it if the Let browse option is enabled. You can only allow selected users to upload files, but not everyone. To do this, follow the context menu also mark those who are allowed in the "Upload -> Upload for users".

If you have a domain name, then it is allowed to register it in "Menu -> IP Address -> Custom", it will also be substituted in the Address line instead of IP. If you have Internet access through NAT, then in HTTP File Server you can search for an external IP (in "Menu -> IP Address -> Find external address").

You can see in your browser what it looks like that you configured. To do this, at the end of the Address line, click the Browse button or simply copy the line from the Address field to the browser. If you have NAT, the use of external addresses is also configured, then temporarily select in “Menu -> IP Address” any of the local addresses or simply enter http://127.0.0.1:port_number in the browser manually.