50 lines
1.6 KiB
HTML
50 lines
1.6 KiB
HTML
|
$def with (host, maxsize)
|
|||
|
|
|||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
|||
|
"http://www.w3.org/TR/html4/strict.dtd">
|
|||
|
<html>
|
|||
|
<head>
|
|||
|
<title>Pastebin</title>
|
|||
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
|
|||
|
</head>
|
|||
|
<body>
|
|||
|
<h1>Pastebin</h1>
|
|||
|
<p>
|
|||
|
Welcome to my Pastebin. You can upload any file here and a short link
|
|||
|
will be generated that you can send to others.
|
|||
|
</p>
|
|||
|
<p>
|
|||
|
<form action="/p" method="POST" enctype="multipart/form-data">
|
|||
|
Select a file to upload:
|
|||
|
<input type="file" name="content">
|
|||
|
<input type="submit" value="Upload">
|
|||
|
</form>
|
|||
|
</p>
|
|||
|
<hr>
|
|||
|
<h2>Additional Hints</h2>
|
|||
|
<p>Here are some hints for features which may not be obvious:</p>
|
|||
|
<ul>
|
|||
|
<li>
|
|||
|
You can use this tool directly from your command line using
|
|||
|
<a href="http://curl.haxx.se">curl</a>. It’s easiest when you define an
|
|||
|
alias like this:
|
|||
|
<pre>alias paste="curl -F 'content=@-' http://$host/p"</pre>
|
|||
|
|
|||
|
Then you can do something like
|
|||
|
<pre>paste < some_file</pre>
|
|||
|
and the link to your file will be printed directly to your shell.
|
|||
|
</li>
|
|||
|
<li>
|
|||
|
The server will try to detect the type of the uploaded data
|
|||
|
automatically and generate an appropriate extension for the file. If
|
|||
|
the server’s guess about the extension is wrong, you can change it.
|
|||
|
The server will then set a MIME-Type associated with the file
|
|||
|
extension on retrieval.
|
|||
|
</li>
|
|||
|
<li>
|
|||
|
The maximum upload size is currently set to $maxsize bytes.
|
|||
|
</li>
|
|||
|
</ul>
|
|||
|
</body>
|
|||
|
</html>
|