2021-05-04 02:46:56 +01:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}Simple Fileupload{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
|
|
|
<h2>Upload drawing file into folder '{{folder}}'</h2>
|
|
|
|
<p style="font-family: monospace; font-weight: bold; font-size: 130%; text-align: center">
|
|
|
|
<div style = "max-width:35%; margin-left:20%; text-align: center; " >
|
|
|
|
<form method ='post' enctype ="multipart/form-data">
|
|
|
|
{% csrf_token %}
|
|
|
|
<br>
|
|
|
|
<input class="fancybutton" type = "file" multiple="multiple"
|
2021-05-04 20:56:44 +01:00
|
|
|
name = "uploadfiles" id="uploadfiles" />
|
2021-05-04 02:46:56 +01:00
|
|
|
<br><br><br>
|
|
|
|
<button class="fancybutton" style="padding: 0.5em 25px; margin-left: 155px" type = "submit" value = "Upload" >
|
|
|
|
Upload
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div style = "max-width:70%; margin-left:20%; text-align: left" >
|
|
|
|
<p>Only drawings and drawing config files can be uploaded.
|
|
|
|
</div>
|
|
|
|
<div style = "max-width:70%; margin-left:20%; text-align: left" >
|
2021-05-05 00:35:10 +01:00
|
|
|
{% if refused %}
|
|
|
|
<p>
|
|
|
|
<b>Files refused: </b><br>
|
|
|
|
{% for f in refused %}
|
|
|
|
<em>{{f}}</em> <br>
|
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2021-05-04 02:46:56 +01:00
|
|
|
{% if filesaved %}
|
|
|
|
<p>
|
2021-05-05 00:35:10 +01:00
|
|
|
<b>Drawing(s) saved as </b><br>
|
2021-05-04 02:46:56 +01:00
|
|
|
{% for f in actual_saved %}
|
|
|
|
<em>{{f}}</em> <br>
|
|
|
|
{% endfor %}
|
2021-05-05 00:35:10 +01:00
|
|
|
<br>Upload more?</b>
|
2021-05-04 02:46:56 +01:00
|
|
|
</p>
|
|
|
|
{% endif %}
|
2021-05-05 00:35:10 +01:00
|
|
|
<hr><br>
|
|
|
|
{% if doesnotexist %}
|
|
|
|
<p>No folder of this name.<br>
|
|
|
|
It would be created if you upload a file.
|
|
|
|
{% else %}
|
|
|
|
<strong style="font-size: 110%;">Files:</strong><br>
|
|
|
|
{% for f in files %}
|
|
|
|
<a href="{{urlfile|urlencode}}/{{f|urlencode}}">{{f}}</a><br />
|
|
|
|
{% empty %}
|
|
|
|
<p><No files here>
|
|
|
|
{% endfor %}
|
2021-05-04 02:46:56 +01:00
|
|
|
|
|
|
|
|
2021-05-05 00:35:10 +01:00
|
|
|
<p><strong style="font-size: 110%;">Directories:</strong><br>
|
|
|
|
{% if folder %}
|
|
|
|
<a href="{{urldir}}/..">[up]</a><br />
|
|
|
|
{% endif %}
|
|
|
|
{% for f in dirs %}
|
|
|
|
<a href="{{urldir}}/{{f}}">/{{f}}/</a><br />
|
|
|
|
{% empty %}
|
|
|
|
<p><No subdirectories>
|
|
|
|
{% endfor %}
|
2022-03-05 20:29:01 +00:00
|
|
|
<p>Clicking on a filename only shows the file if the drawing file had already been imported into the system as part of a bulk-import
|
|
|
|
as we are matching it against a file recorded in the database. If you only just uploaded it, you will get an error message.
|
|
|
|
<p>You cannot create folders here, but you can put files into any of the pre-existing folders.
|
2022-03-05 22:16:03 +00:00
|
|
|
<p>Note that JPG, PNG and PDF files are refused: this area is reserved for Tunnel and Therion files. You may see some old ones here,
|
|
|
|
pending their removal and replacement, but you cannot upload new ones.
|
2021-05-04 02:46:56 +01:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|