more work on media upload

This commit is contained in:
Nolan Lawson 2018-03-01 09:29:11 -08:00
parent 71d0e4ddd1
commit 66a803b170

View file

@ -8,12 +8,13 @@
href="#fa-camera"
on:click="onMediaClick()"
/>
<IconButton label="Adjust privacy" href="#fa-globe" />
<IconButton label="Add content warning" href="#fa-exclamation-triangle" />
<input ref:input
on:change="onFileChange(event)"
style="display: none;"
type="file"
accept=".jpg,.jpeg,.png,.gif,.webm,.mp4,.m4v,image/jpeg,image/png,image/gif,video/webm,video/mp4">
<IconButton label="Adjust privacy" href="#fa-globe" />
<IconButton label="Add content warning" href="#fa-exclamation-triangle" />
</div>
<style>
.compose-box-toolbar {
@ -42,6 +43,9 @@
},
onMediaClick() {
this.refs.input.click()
},
onFileChange(e) {
let file = e.target.files[0]
}
}