mirror of
https://github.com/Rouji/single_php_filehost.git
synced 2025-04-10 19:08:45 +00:00
appended info output with a few things
This commit is contained in:
parent
0ebe995415
commit
a41a2eafa7
48
index.php
48
index.php
@ -198,46 +198,50 @@ function printInfo()
|
|||||||
|
|
||||||
$url = $HTTP_PROTO."://".$_SERVER["HTTP_HOST"].$_SERVER['REQUEST_URI'];
|
$url = $HTTP_PROTO."://".$_SERVER["HTTP_HOST"].$_SERVER['REQUEST_URI'];
|
||||||
|
|
||||||
echo <<<EOT
|
echo <<<EOT
|
||||||
<html>
|
|
||||||
<head></head>
|
|
||||||
<body>
|
|
||||||
<pre>
|
<pre>
|
||||||
========== How To Upload ==========
|
=== How To Upload ===
|
||||||
You can upload files to this site via a simple HTTP POST,
|
You can upload files to this site via a simple HTTP POST, e.g. using curl:
|
||||||
e.g. using curl:
|
|
||||||
curl -F "file=@/path/to/your/file.jpg" $url
|
curl -F "file=@/path/to/your/file.jpg" $url
|
||||||
|
|
||||||
Or by choosing a file and clicking "Upload" below:
|
On Android, you can use an app called <a href="https://play.google.com/store/apps/details?id=eu.imouto.hupl">Hupl</a>.
|
||||||
|
|
||||||
|
|
||||||
|
Or simply choose a file and click "Upload" below:
|
||||||
</pre>
|
</pre>
|
||||||
<form id="frm" action="" method="post"
|
<form id="frm" action="" method="post" enctype="multipart/form-data">
|
||||||
enctype="multipart/form-data">
|
|
||||||
<input type="file" name="file" id="file" />
|
<input type="file" name="file" id="file" />
|
||||||
<input type="hidden" name="formatted" value="true" />
|
<input type="hidden" name="formatted" value="true" />
|
||||||
<input type="submit" value="Upload"/>
|
<input type="submit" value="Upload"/>
|
||||||
</form>
|
</form>
|
||||||
<pre>
|
<pre>
|
||||||
(Hint: If you're lucky, your browser may support drag-
|
(Hint: If you're lucky, your browser may support drag-and-drop onto the file
|
||||||
and-drop onto the file selection input.)
|
selection input.)
|
||||||
|
|
||||||
|
|
||||||
========== File Sizes etc. ==========
|
=== File Sizes etc. ===
|
||||||
The maximum allowed file size is $MAX_FILESIZE MB.
|
The maximum allowed file size is $MAX_FILESIZE MB.
|
||||||
|
|
||||||
Files are kept for a minimum of $MIN_FILEAGE, and a maximum
|
Files are kept for a minimum of $MIN_FILEAGE, and a maximum of $MAX_FILEAGE Days.
|
||||||
of $MAX_FILEAGE Days.
|
|
||||||
|
|
||||||
How long a file is kept, depends on its size. Larger
|
How long a file is kept, depends on its size. Larger files are deleted earlier
|
||||||
files are deleted earlier than small ones. This relation
|
than small ones. This relation is non-linear and skewed in favour of small
|
||||||
is non-linear and skewed in favour of small files.
|
files.
|
||||||
|
|
||||||
The exact formula for determining the maximum age for
|
The exact formula for determining the maximum age for a file is:
|
||||||
a file is:
|
|
||||||
|
|
||||||
MIN_AGE + (MAX_AGE - MIN_AGE) * (1-(FILE_SIZE/MAX_SIZE))^$DECAY_EXP
|
MIN_AGE + (MAX_AGE - MIN_AGE) * (1-(FILE_SIZE/MAX_SIZE))^$DECAY_EXP
|
||||||
|
|
||||||
|
|
||||||
|
=== Source ===
|
||||||
|
The PHP script used to provide this service is open source and available on
|
||||||
|
<a href="https://github.com/Rj48/single_php_filehost">GitHub</a>
|
||||||
|
|
||||||
|
|
||||||
|
=== Contact ===
|
||||||
|
If you want to report abuse of this service, or have any other inquiries,
|
||||||
|
please write an email to $ADMIN_EMAIL
|
||||||
</pre>
|
</pre>
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
EOT;
|
EOT;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user