Add junk drawer
This commit is contained in:
15
views/junk-drawer/upload-result.hbs
Normal file
15
views/junk-drawer/upload-result.hbs
Normal file
@@ -0,0 +1,15 @@
|
||||
<div>
|
||||
<h1>Upload Result</h1>
|
||||
<p>File uploaded successfully.</p>
|
||||
<p>{{description}}</p>
|
||||
<p>Right-click copy: <a href='/junk-drawer/{{slug}}'>{{slug}}</a></p>
|
||||
{{#if items}}
|
||||
<p>Files:</p>
|
||||
<ul>
|
||||
{{#each items}}
|
||||
<li><a target="_blank" href='/junk-drawer/{{../slug}}/{{filename}}'>{{filename}}</a></li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
<p><a href='/junk-drawer'>Upload another file</a></p>
|
||||
</div>
|
18
views/junk-drawer/upload.hbs
Normal file
18
views/junk-drawer/upload.hbs
Normal file
@@ -0,0 +1,18 @@
|
||||
<form method='post' action='/junk-drawer/upload' enctype='multipart/form-data'>
|
||||
<div>
|
||||
<label for='files'>Choose files to upload</label>
|
||||
<input type='file' id='files' name='files' multiple />
|
||||
</div>
|
||||
<div style='display:flex; flex-direction:column;'>
|
||||
<label for='description'>Description</label>
|
||||
<textarea
|
||||
type='text'
|
||||
id='description'
|
||||
name='description'
|
||||
rows='4'
|
||||
></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<button>Submit</button>
|
||||
</div>
|
||||
</form>
|
16
views/junk-drawer/view.hbs
Normal file
16
views/junk-drawer/view.hbs
Normal file
@@ -0,0 +1,16 @@
|
||||
<div>
|
||||
<h1>Junk Drawer Item</h1>
|
||||
<p>The junk drawer item was uploaded {{lastModified}}</p>
|
||||
<h2>Description</h2>
|
||||
<p>{{description}}</p>
|
||||
<p>Right-click copy: <a href='/junk-drawer/{{slug}}'>{{slug}}</a></p>
|
||||
{{#if items}}
|
||||
<p>Files:</p>
|
||||
<ul>
|
||||
{{#each items}}
|
||||
<li><a href='/junk-drawer/{{../slug}}/{{filename}}'>{{filename}}</a></li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
<p><a href='/junk-drawer'>Upload another file</a></p>
|
||||
</div>
|
Reference in New Issue
Block a user