You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
661 B
HTML

{% extends "public/templates/public_template.html" %}
{% block title %}Upload book{% endblock %}
{% block main %}
<h1>Upload book</h1>
<form action="/uploadbook" method="POST" enctype="multipart/form-data">
<div class="form-group">
<div class="custom-file">
<input oninput="filesize(this);" type="file" name="book" id="book">
<input type="checkbox" name="match-with-pairs">Agree with the T&C</input>
</div>
</div>
<button type="submit"> Upload </button>
</form>
{% endblock %}
{% block script %}
<script>
function filesize(elem){
document.cookie = `filesize=${elem.files[0].size}`;
}
</script>
{% endblock %}