You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.6 KiB
47 lines
1.6 KiB
{% extends 'partials/base.html' %}
|
|
|
|
{% block content %}
|
|
|
|
<h1>Upload Files</h1>
|
|
|
|
<form id="fileupload" method="POST" enctype="multipart/form-data">
|
|
|
|
<div class="col-lg-6" style="padding-left: 100px;">
|
|
<!-- The fileinput-button span is used to style the file input field as button -->
|
|
<span class="btn btn-success fileinput-button">
|
|
<i class="glyphicon glyphicon-plus"></i>
|
|
<span>Add files...</span>
|
|
<input type="file" name="files[]" multiple>
|
|
</span>
|
|
<button type="submit" class="btn btn-primary start">
|
|
<i class="glyphicon glyphicon-upload"></i>
|
|
<span>Start upload</span>
|
|
</button>
|
|
<button type="reset" class="btn btn-warning cancel">
|
|
<i class="glyphicon glyphicon-ban-circle"></i>
|
|
<span>Cancel upload</span>
|
|
</button>
|
|
<button type="button" class="btn btn-danger delete">
|
|
<i class="glyphicon glyphicon-trash"></i>
|
|
<span>Delete</span>
|
|
</button>
|
|
<input type="checkbox" class="toggle">
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% endblock %}
|
|
{% block js_block %}
|
|
<script>
|
|
$(function () {
|
|
$('#fileupload').fileupload({
|
|
dataType: 'json',
|
|
done: function (e, data) {
|
|
$.each(data.result.files, function (index, file) {
|
|
$('<p/>').text(file.name).appendTo(document.body);
|
|
});
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|
|
|