Restarting development

This commit is contained in:
Eric Teunis de Boone 2024-01-08 00:31:15 +01:00
parent 99b7a77444
commit b3c93309ce
2 changed files with 11 additions and 24 deletions

View file

@ -1,5 +1,14 @@
# hippopotato # hippopotato
Simple files storage based on flat files. Simple (local) filestorage based on PHP and flat files.
Currently based on PHP and NGiNX. First iteration is only to server files.
To be able to extend the functionality, these files will first be served from `/f/`.
The code should be written to be used as a PHP module, as well as, a separate site.
The [Slim](https://www.slimframework.com/) provides for the latter.
The visibility of files is toggled by a file in each directory -- `.hippoacl`,
working somewhat like a `.gitignore` file. [^1]
[^1]: https://git.deboone.nl/websites/nl.deboone/issues/16

View file

@ -1,22 +0,0 @@
<?php
$limit_rate = Null;
$url = $_SERVER['REQUEST_URI'];
$file_directory_alias = '/files/';
$file_directory = '../'. $file_directory_alias;
if ( file_exists($file_directory . $url) )
{
if ( !is_null($limit_rate) )
{
header("X-Accel-Limit-Rate: {$limite_rate}");
}
header("X-Accel-Redirect: {$file_directory_alis}{$url}");
exit(0);
}
http_response_code(404);
exit(4);