file upload integration test working

This commit is contained in:
Philip Sargent
2021-04-30 18:02:05 +01:00
parent fde30685a8
commit 8f1d6e2cc2
8 changed files with 128 additions and 102 deletions

View File

@@ -1,18 +0,0 @@
<h2>Fileupload</h2>
<ul>
{% for fileuploaded in filesuploaded %}
<li>UPLOADEDFILE: {{fileuploaded}}
</li>
{% endfor %}
</ul>
<p>MESSAGE: {{message}}
</p>
{% if not filesuploaded %}
<form action="" method="POST">
<p>file to upload</p>
<p><input type="file" name="file1"/></p>
<p><input type="submit" name="submit" value="Submit" /></p>
</form>
{% endif %}

View File

@@ -16,25 +16,12 @@
</p>
<div style = "max-width:40%;">
{% if filesaved %}
<p style="margin-left:20%;">
<b>File(s) saved as
{% for f in actual_saved %}
<em>'{{f}}'</em>
{% endfor %}
<br><br>Upload more?</b>
</p>
<br>
{% endif %}
<div style = "max-width:40%;">
<form method ='post' enctype ="multipart/form-data">
{% csrf_token %}
<br>
<input type = "file" multiple="multiple" style = "margin-left:20%;"
placeholder = "Simplefile" name = "simplefile" id="files">
placeholder = "Scanfiles" name = "scanfiles" id="scanfiles">
<br> <br>
<input type = "text" size = "8" style = "margin-left:20%;"
placeholder = "Wallet id e.g. 2021#23" name = "title" value='{{wallet}}'id="wallet"><label for="wallet"> Wallet id</label>
@@ -46,7 +33,17 @@
</button>
</center>
</form>
</div>
{% if filesaved %}
<p style="margin-left:20%;">
<b>File(s) saved as
{% for f in actual_saved %}
<em>'{{f}}'</em>
{% endfor %}
<br><br>Upload more?</b>
</p>
<br>
{% endif %}
</div>
<p style="margin-left:20%;">
{% for f in files %}