<commit_before>Simple File Sharing
===================

This project implements a simple PHP server for sharing files with others over a standard 
web server. Just clone this project in a folder on your Apache and you should be good to go.

Each shared file is stored inside an enclosing folder with a sufficiently long random name. 
This simple strategy ensures that shared files cannot be accessed without knowing the 
correct URL. Only brute-force guessing of the secret names would allow enumeration of all 
available downloads.

Because this is work in progress, the server so far only implements the downloading part of 
file sharing. Uploading has to be performed through administrative access to your web 
server. I use SSH for now, until I get around to implementing a nice upload interface.

This work is licensed under the [GNU AGPL v3](http://www.gnu.org/licenses/agpl-3.0.html) or 
higher.

Query String Commands
---------------------

The server works by reacting to various commands which are passed in the query string 
portion of the URL:

**download**  
Add a `Content-Disposition` header so that the browser downloads the file instead of 
displaying it.

**gc**  
Garbage-collects stored files. Uploads are automatically deleted after 32 days, when this 
command is regularly run by a cron job. Collection can be delayed by touching the enclosing 
folder or prevented indefinitely by changing permissions to read-only.<commit_msg>clarify that these are query strings<commit_after>Simple File Sharing
===================

This project implements a simple PHP server for sharing files with others over a standard 
web server. Just clone this project in a folder on your Apache and you should be good to go.

Each shared file is stored inside an enclosing folder with a sufficiently long random name. 
This simple strategy ensures that shared files cannot be accessed without knowing the 
correct URL. Only brute-force guessing of the secret names would allow enumeration of all 
available downloads.

Because this is work in progress, the server so far only implements the downloading part of 
file sharing. Uploading has to be performed through administrative access to your web 
server. I use SSH for now, until I get around to implementing a nice upload interface.

This work is licensed under the [GNU AGPL v3](http://www.gnu.org/licenses/agpl-3.0.html) or 
higher.

Query String Commands
---------------------

The server works by reacting to various commands which are passed in the query string 
portion of the URL:

**`?download`**  
Add a `Content-Disposition` header so that the browser downloads the file instead of 
displaying it.

**`?gc`**  
Garbage-collects stored files. Uploads are automatically deleted after 32 days, when this 
command is regularly run by a cron job. Collection can be delayed by touching the enclosing 
folder or prevented indefinitely by changing permissions to read-only.
{'fraction_non_alphanumeric': 0.062179706183805944, 'fraction_numerical': 0.0034164673727365906, 'mean_word_length': 4.101045296167247, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3031822', 'n_tokens_mistral': 721, 'n_tokens_neox': 678, 'n_words': 432}