Add attachments support

This commit is contained in:
r 2019-12-14 20:19:02 +00:00
parent ea66bd539d
commit e129ea922e
8 changed files with 86 additions and 11 deletions

View file

@ -8,12 +8,14 @@
{{template "status.tmpl" .Status}}
{{if .PostReply}}
<form class="timeline-post-form" action="/post" method="POST">
<form class="timeline-post-form" action="/post" method="POST" enctype="multipart/form-data">
<input type="hidden" name="reply_to_id" value="{{.ReplyToID}}" />
<label for="post-content"> Reply to {{.Status.Account.DisplayName}} </label>
<br/>
<textarea id="post-content" name="content" class="post-content" cols="50" rows="5">{{.ReplyContent}}</textarea>
<br/>
Attachments <input id="post-file-picker" type="file" name="attachments" multiple>
<br/>
<button type="submit"> Post </button>
</form>
{{end}}

View file

@ -2,11 +2,13 @@
<div class="page-title"> Timeline </div>
{{template "navigation.tmpl"}}
<form class="timeline-post-form" action="/post" method="POST">
<form class="timeline-post-form" action="/post" method="POST" enctype="multipart/form-data">
<label for="post-content"> New Post </label>
<br/>
<textarea id="post-content" name="content" class="post-content" cols="50" rows="5"></textarea>
<br/>
Attachments <input id="post-file-picker" type="file" name="attachments" multiple>
<br/>
<button type="submit"> Post </button>
</form>