linx-server/templates/index.html
Benjamin Neff 6290f408ff Allow to paste images (#153)
dropzone.js doesn't support pasting itself yet, so adding it externally
and calling `.addFile()` to upload the pasted image.

Fixes #130
2019-01-11 09:09:54 -08:00

40 lines
1.4 KiB
HTML

{% extends "base.html" %}
{% block head %}
<link href='{{ sitepath }}static/css/dropzone.css' media='screen, projection' rel='stylesheet' type='text/css'>
{% endblock %}
{% block content %}
<div id="fileupload">
<form action="{{ sitepath }}upload" class="dropzone" id="dropzone" method="POST" enctype="multipart/form-data" data-maxsize="{{ maxsize }}">
<div class="fallback">
<input id="fileinput" name="file" type="file" /><br />
<input id="submitbtn" type="submit" value="Upload">
</div>
<div id="dzone" class="dz-default dz-message">
<span>Click or Drop file(s) or Paste image</span>
</div>
<div id="choices">
<div id="expiry">
<label>File expiry:
<select name="expires" id="expires">
{% for expiry in expirylist %}
<option value="{{ expiry.Seconds }}"{% if forloop.Last %} selected{% endif %}>{{ expiry.Human }}</option>
{% endfor %}
</select>
</label>
</div>
<label><input name="randomize" id="randomize" type="checkbox" checked /> Randomize filename</label>
</div>
<div class="clear"></div>
</form>
<div id="uploads"></div>
<div class="clear"></div>
</div>
<script src="{{ sitepath }}static/js/dropzone.js"></script>
<script src="{{ sitepath }}static/js/upload.js"></script>
{% endblock %}