1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-01 04:38:12 +00:00
gns3-server/gns3server/templates/upload.html

42 lines
1.4 KiB
HTML
Raw Normal View History

{% extends "layout.html" %}
2015-06-12 08:10:46 +00:00
{% block script %}
function onSubmit() {
if (document.getElementById("uploadInput").files == undefined) {
//OLD browser
return true;
}
max_size = 200;
var file = document.getElementById("uploadInput").files[0];
var size = Math.round(file.size / 1000000);
if (size > max_size) {
alert("The file is too big (" + size + " MB). The max upload size is " + max_size + " MB. Please Upload your file with the GNS3 GUI");
return false;
}
return true;
}
{% endblock %}
{% block body %}
<h1>Select & Upload an image for GNS3</h1>
2015-06-12 08:10:46 +00:00
<form enctype="multipart/form-data" action="/upload" method="post" onSubmit="return onSubmit()">
File path: <input type="file" name="file" id="uploadInput" /><br>
2015-03-13 17:46:02 +00:00
File type: <select name="type" />
<option value="IOU">IOU</option>
2015-03-13 17:46:02 +00:00
<option value="IOURC">IOU licence (iourc)</option>
<option value="IOS">IOS</option>
<option value="QEMU">Qemu</option>
2015-07-21 14:14:03 +00:00
<option value="IMAGES">GNS3 images backup (.tar)</option>
<option value="PROJECTS">GNS3 projects backup (.tar)</option>
</select>
<br />
<br />
<input type="submit" value="Upload" />
</form>
2015-02-23 16:21:39 +00:00
{%if files%}
<h2>Files on {{gns3_host}}</h2>
{%for file in files%}
<p>{{file}}</a></p>
{%endfor%}
{%endif%}
{% endblock %}