2023-09-29 15:25:20 +02:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
2023-10-21 07:45:56 +02:00
|
|
|
{% block head %}
|
|
|
|
|
|
|
|
{%- if ! conf.files.allow_uploads -%}
|
|
|
|
<link rel="stylesheet" href="/alert.css" />
|
|
|
|
{%- endif -%}
|
2023-10-21 08:01:13 +02:00
|
|
|
<link rel="stylesheet" href="/upload_form.css" />
|
2023-10-21 07:45:56 +02:00
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|
2023-09-29 16:41:23 +02:00
|
|
|
{% block body %}
|
2023-09-29 15:25:20 +02:00
|
|
|
|
2023-09-30 04:23:54 +02:00
|
|
|
<div style="max-width:95vw;width:fit-content;margin:0 auto">
|
|
|
|
<h1 style="text-align:center">File upload</h1>
|
|
|
|
<div style='margin:var(--margin)'>
|
|
|
|
<p>
|
|
|
|
You can upload a file here <b>for free</b> to share with others for 30 minutes.<br/>
|
|
|
|
How cool is that, eh?
|
|
|
|
</p>
|
|
|
|
<div class="card">
|
2023-09-30 05:22:33 +02:00
|
|
|
<h2 class="card-title" style="margin:0">
|
2023-09-30 04:23:54 +02:00
|
|
|
Upload form
|
2023-09-30 05:22:33 +02:00
|
|
|
</h2>
|
2023-09-30 04:23:54 +02:00
|
|
|
<div class='card-text'>
|
|
|
|
<form action="/upload" method="POST" enctype="multipart/form-data">
|
|
|
|
<p>
|
|
|
|
I want my file deleted:
|
|
|
|
</p>
|
|
|
|
<ul class="bfile-formupload-file-delete-pick">
|
|
|
|
<li>
|
|
|
|
<input type="radio" id="bfile-formupload-delete-30-min" name="delmode" value='30' checked />
|
|
|
|
<label for="bfile-formupload-delete-30-min">After 30 minutes</label>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<input type="radio" id="bfile-formupload-delete-dl" name="delmode" value='dl' />
|
|
|
|
<label for="bfile-formupload-delete-dl">After 30 minutes OR a download</label>
|
|
|
|
</li>
|
|
|
|
</ul>
|
2023-10-21 05:43:37 +02:00
|
|
|
{%- if conf.files.allow_custom_names -%}
|
|
|
|
<p>
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="named">
|
|
|
|
</label>
|
|
|
|
<label for="bfile-formupload-file-name">
|
|
|
|
I also want my file named:
|
|
|
|
</label>
|
|
|
|
<span class="form-input-partial">
|
|
|
|
<span class="form-input-label">
|
|
|
|
{{ env.instanceurl }}/
|
|
|
|
</span>
|
|
|
|
<input style="max-width:100px" id='bfile-formupload-file-name' type="text" name="filename" placeholder="file.txt"></input>
|
2023-09-30 05:55:17 +02:00
|
|
|
</span>
|
2023-10-21 05:43:37 +02:00
|
|
|
</p>
|
|
|
|
{%- endif -%}
|
|
|
|
|
|
|
|
{%- if conf.files.allow_pass_protection -%}
|
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="passworded">
|
|
|
|
I want to add a password to the file:
|
|
|
|
|
|
|
|
<span style="font-size:80%;display:block">
|
|
|
|
Warning: the file WILL NOT be encrypted,<br/>
|
|
|
|
therefore this is not 100% secure.<br/>
|
|
|
|
<a href="/passworded-files">
|
|
|
|
Learn more
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
</td>
|
|
|
|
<td style="padding-left:4px">
|
|
|
|
<label>
|
|
|
|
<input type="password" name="password" style="max-width:90px">
|
|
|
|
</label>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{%- endif -%}
|
2023-10-13 15:13:16 +02:00
|
|
|
<p>
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="tos_consent">
|
|
|
|
I agree to the
|
|
|
|
<a href="/tos">
|
|
|
|
Terms and Conditions
|
|
|
|
</a>
|
|
|
|
<span style='font-size:70%;color:red;transform:translateY(-30%);display:inline-block'>
|
|
|
|
(required)
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
</p>
|
2023-10-21 05:43:37 +02:00
|
|
|
{%- if ! conf.files.allow_uploads -%}
|
2023-10-21 05:52:03 +02:00
|
|
|
<div class="alert danger" style="width:426px">
|
2023-10-21 05:43:37 +02:00
|
|
|
<h1 class="alert-title">
|
|
|
|
Error
|
|
|
|
</h1>
|
|
|
|
<p class="alert-text">
|
2023-10-21 05:57:25 +02:00
|
|
|
Uploads are temporarily disabled
|
2023-10-21 05:52:03 +02:00
|
|
|
{%- if let Some(disable_reason) = conf.files.upload_disable_reason -%}
|
2023-10-21 05:57:25 +02:00
|
|
|
{{- " " -}} for the following reason:
|
|
|
|
<span style="display:block;font-family:monospace;padding-top:12px">
|
2023-10-21 05:52:03 +02:00
|
|
|
{{- disable_reason -}}
|
|
|
|
</span>
|
|
|
|
{%- else -%}
|
|
|
|
.
|
|
|
|
{%- endif -%}
|
2023-10-21 05:57:25 +02:00
|
|
|
<span style="display:block;padding-top:12px">
|
2023-10-21 05:52:03 +02:00
|
|
|
Check again in a few minutes.
|
|
|
|
</span>
|
2023-10-21 05:43:37 +02:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{%- else -%}
|
2023-10-26 16:50:02 +02:00
|
|
|
|
|
|
|
{%- if let Some(pass) = conf.files.upload_pass -%}
|
|
|
|
<div class="alert blue">
|
|
|
|
<h1 class="alert-title">
|
|
|
|
Upload password
|
|
|
|
</h1>
|
|
|
|
<div class="alert-text">
|
|
|
|
<p>This instance requires a password to upload a file.</p>
|
|
|
|
<p>
|
|
|
|
<label>
|
|
|
|
Password:
|
2023-10-26 17:02:09 +02:00
|
|
|
<input type="password" name="instancepass">
|
2023-10-26 16:50:02 +02:00
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{%- endif -%}
|
|
|
|
|
2023-10-21 05:43:37 +02:00
|
|
|
<p>
|
|
|
|
<input type="file" name="file" id="bfile-formupload-file" style="display: none" />
|
|
|
|
<label for="bfile-formupload-file">
|
|
|
|
<span class='btn btn-fill mobile-file-upload-btn'>
|
|
|
|
Select a file
|
|
|
|
</span>
|
|
|
|
<button type="button" class="file-drag-n-drop">
|
|
|
|
<span class="file-drag-n-drop-inside">
|
|
|
|
<span class="file-drag-n-drop-inside-text">
|
|
|
|
<object data="/tab-new-symbolic.svg" width="32" height="32" tabindex="-1"></object><br/>
|
|
|
|
<span style="line-height:16pt">
|
|
|
|
<span id='drag-n-drop-jsonly' style='display:none'>
|
|
|
|
Drag & drop your files here!
|
2023-09-30 04:23:54 +02:00
|
|
|
</span>
|
2023-10-21 05:43:37 +02:00
|
|
|
<noscript>
|
|
|
|
Click to upload your files!<br/>
|
|
|
|
<span style="font-size: 70%">
|
|
|
|
You will be able to drag and drop if you enable JS
|
|
|
|
</span>
|
|
|
|
</noscript>
|
|
|
|
</span>
|
2023-09-30 04:23:54 +02:00
|
|
|
</span>
|
2023-09-29 17:09:24 +02:00
|
|
|
</span>
|
2023-10-21 05:43:37 +02:00
|
|
|
</button>
|
|
|
|
<script src="/dragndrop-form.js"></script>
|
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<button class='btn btn-fill'>
|
|
|
|
Upload!
|
2023-09-30 05:55:17 +02:00
|
|
|
</button>
|
2023-10-21 05:43:37 +02:00
|
|
|
</p>
|
|
|
|
{%- endif -%}
|
2023-09-30 04:23:54 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
2023-09-29 16:41:23 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-09-29 15:25:20 +02:00
|
|
|
|
|
|
|
{% endblock %}
|