Browse Source
This is an end-of-session commit. I've got the route up and running with the /user/storage HTML template rendering in the browser and listing out the files in storage. I could do with adding a model and storing the files meta-data in the database. This page could do with rendering the images and placeholders (E.G.generic text file icon) for non-image files.stable
Craig Oates
2 years ago
3 changed files with 45 additions and 1 deletions
@ -0,0 +1,27 @@
|
||||
{% extends "layouts/default.html" %} |
||||
{% block title %}Manage you archive.{% endblock %} |
||||
{% block content %} |
||||
<h1>Storage</h1> |
||||
|
||||
{% for item in files %} |
||||
{{item}} |
||||
{% endfor %} |
||||
|
||||
<div> |
||||
<h2>File Upload</h2> |
||||
<form action="/storage/upload" method="POST" enctype="multipart/form-data"> |
||||
<input required type="hidden" name="AUTHENTICITY-TOKEN" value="{{token}}"> |
||||
<label>Single File Upload</label> |
||||
<input required type="file" name="STORAGE-FILE"> |
||||
<input type="submit" value="Upload File"/> |
||||
</form> |
||||
|
||||
<form action="/storage/multi-upload" method="POST" enctype="multipart/form-data"> |
||||
<input required type="hidden" name="AUTHENTICITY-TOKEN" value="{{token}}"> |
||||
<label>Multi-File Upload</label> |
||||
<input required type="file" name="STORAGE-FILES" multiple> |
||||
<input type="submit" value="Upload Files"/> |
||||
</form> |
||||
</div> |
||||
|
||||
{% endblock %} |
Loading…
Reference in new issue