Showing
1 changed file
with
8 additions
and
0 deletions
... | @@ -247,12 +247,14 @@ | ... | @@ -247,12 +247,14 @@ |
247 | </v-list-item> | 247 | </v-list-item> |
248 | </v-list> | 248 | </v-list> |
249 | </v-menu> | 249 | </v-menu> |
250 | + <div v-cloak @drop.prevnet="addFile" @dragover.prevent> | ||
250 | <input | 251 | <input |
251 | id="file-selector" | 252 | id="file-selector" |
252 | ref="uploadedfile" | 253 | ref="uploadedfile" |
253 | type="file" | 254 | type="file" |
254 | v-on:change="handleFileUpload()" | 255 | v-on:change="handleFileUpload()" |
255 | /> | 256 | /> |
257 | + </div> | ||
256 | <br /> | 258 | <br /> |
257 | <v-btn color="blue" @click="upload_file">upload</v-btn> | 259 | <v-btn color="blue" @click="upload_file">upload</v-btn> |
258 | <v-btn bottom color="blue" dark fab fixed right @click="dialog = !dialog"> | 260 | <v-btn bottom color="blue" dark fab fixed right @click="dialog = !dialog"> |
... | @@ -360,6 +362,11 @@ export default { | ... | @@ -360,6 +362,11 @@ export default { |
360 | this.uploadedfile = this.$refs.uploadedfile.files[0]; | 362 | this.uploadedfile = this.$refs.uploadedfile.files[0]; |
361 | console.log(this.uploadedfile); | 363 | console.log(this.uploadedfile); |
362 | }, | 364 | }, |
365 | + addFile(event){ | ||
366 | + let droppedFiles = event.dataTransfer.files; | ||
367 | + if(!droppedFiles) return; | ||
368 | + console.log(droppedFiles); | ||
369 | + }, | ||
363 | initFolderName() { | 370 | initFolderName() { |
364 | this.foldername = ''; | 371 | this.foldername = ''; |
365 | }, | 372 | }, |
... | @@ -616,6 +623,7 @@ export default { | ... | @@ -616,6 +623,7 @@ export default { |
616 | cur: this.cfilename.location, | 623 | cur: this.cfilename.location, |
617 | fileName: this.cfilename.file_name | 624 | fileName: this.cfilename.file_name |
618 | } | 625 | } |
626 | + //확장자(txt)로 필터링해서 함수 실행여부 결정할것. | ||
619 | const detailData = await detailFile(currentData) | 627 | const detailData = await detailFile(currentData) |
620 | this.current_filename = detailData.data.file_name; | 628 | this.current_filename = detailData.data.file_name; |
621 | this.current_filedata = detailData.data.content; | 629 | this.current_filedata = detailData.data.content; | ... | ... |
-
Please register or login to post a comment