stash
This commit is contained in:
parent
1a96caee1f
commit
012cf00e8e
1 changed files with 2 additions and 6 deletions
|
@ -8,7 +8,7 @@
|
|||
<ul>
|
||||
<img v-for="file in files" :key="file.id" :src="file.name" :alt="file.name" class="img-thumbnail">
|
||||
</ul>
|
||||
<legend>Files</legend>
|
||||
<h4>Files</h4>
|
||||
<div class="input-group">
|
||||
<input type="file" class="form-control" multiple id="files">
|
||||
<button class="btn btn-outline-secondary" type="button">
|
||||
|
@ -19,7 +19,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="input-group" v-if="show_camera">
|
||||
<input type="file" class="form-control" accept="image/*" capture="camera" id="photos">
|
||||
<input type="file" class="form-control" accept="image/*" multiple capture="camera" id="photos">
|
||||
<button class="btn btn-outline-secondary" type="button">
|
||||
<b-icon-trash></b-icon-trash>
|
||||
</button>
|
||||
|
@ -68,7 +68,6 @@ export default {
|
|||
methods: {
|
||||
...mapActions(["fetchFiles", "pushFile"]),
|
||||
async uploadFiles() {
|
||||
//const formData = new FormData();
|
||||
const files = document.getElementById("files").files;
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
var reader = new FileReader();
|
||||
|
@ -96,10 +95,8 @@ export default {
|
|||
});
|
||||
await this.fetchFiles();
|
||||
}
|
||||
//console.log("formData", formData);
|
||||
},
|
||||
async uploadPhoto() {
|
||||
//const formData = new FormData();
|
||||
const files = document.getElementById("photos").files;
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
var reader = new FileReader();
|
||||
|
@ -127,7 +124,6 @@ export default {
|
|||
});
|
||||
await this.fetchFiles();
|
||||
}
|
||||
//console.log("formData", formData);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
|
Loading…
Reference in a new issue