kbpark9898

change aws key and bucket to qkrrlqja-test / modify FileList.vue for file function.

...@@ -3,7 +3,7 @@ const router = express.Router(); ...@@ -3,7 +3,7 @@ const router = express.Router();
3 const AWS = require("aws-sdk"); 3 const AWS = require("aws-sdk");
4 const moment = require("moment"); 4 const moment = require("moment");
5 5
6 -const BUCKET_NAME = "hong-s3-cloud"; 6 +const BUCKET_NAME = "qkrrlqja-test";
7 let curPath = ""; 7 let curPath = "";
8 let user_id = ""; 8 let user_id = "";
9 let parentPath = ""; 9 let parentPath = "";
......
1 { 1 {
2 - "accessKeyId": "ASIAXZL2SWFEYG2GUYVJ", 2 + "accessKeyId": "ASIAXZL2SWFEZSIHHRDT",
3 - "secretAccessKey": "ceYvfLs25iiBDfigO7PbP67kJoKswJdfduqROrJt", 3 + "secretAccessKey": "cdcXCezNz9OhFowZxE2KSftDmT3xSYAtiLJl1dFk",
4 - "sessionToken": "FwoGZXIvYXdzEDMaDGvezwF9kQrAJ+uhfSLDASWFKBk7UNbRzZVEM1eoGJ3E+UI9d4xSpqEDqRYjsOTn5wYIGM3mUCZ8S6/XCnGP5yFz+qv9mBLDf311iP9ajY091OhQ8c2nB6l+JHuRKAz6FhGLrjHtD1AecHtjHOu5dXODU2+9ctvGj7V60KYqjToah5Tvv84EVac/41Les3rtrqcXS/bbmVwv5kDz9K1FJStln4sXZ/foueGHZAkAJQ6LAtIQWg4/reFUcWAi8E0bUjMckmymDQhnVNWcSbgQ+htBYiiPg+P2BTItOqWuZojM5lw32rTv7+PuOaeyHjx3+Vcd4bo3orSJr57P2ZPfmglZNKY7W5aw", 4 + "sessionToken": "FwoGZXIvYXdzEJf//////////wEaDG1NOyJj0/Xdzqu+uyLDAa8vgymCVldXPpET+AOsq5CXhMzhMEDmWogIaq6lWJVy8sdnK9tOXY/u9vz8p6cTm7xWb0YiX6TKDhlfFZX6ynv0Xw/p/qvbn4lPsoT8K9PpdDOWJUMA8qX/5RrKNO4OAolUkw+EMjQbK38u+g3HEVP8mo+DiGLrBGj+0Ar0xhGiU/Lg5qKRdp+tEYIn0ypDNu/2q13apRiMH7n+OVFzilil10g1qq8NLaW98QvVC4xRIgkjAMcRqA9yPdVrhc9yFyqjrCjA+vj2BTIt8CDkFsEAFqJR3W0YPDbsu2YdTq3SKgpOsxNXGsEFMaEhFxodp5/Qsk7tfMsO",
5 "region": "us-east-1" 5 "region": "us-east-1"
6 } 6 }
......
1 +this is the second test edit
...\ No newline at end of file ...\ No newline at end of file
1 -asdf
...\ No newline at end of file ...\ No newline at end of file
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 var AWS = require('aws-sdk'); 17 var AWS = require('aws-sdk');
18 AWS.config.update({ region: 'ap-northeast-2' }); 18 AWS.config.update({ region: 'ap-northeast-2' });
19 19
20 -var BUCKET_NAME = 'khuloud'; 20 +var BUCKET_NAME = 'qkrrlqja-test';
21 21
22 var s3 = new AWS.S3(); 22 var s3 = new AWS.S3();
23 var fs = require('fs'); 23 var fs = require('fs');
......
1 +<template lang="html">
2 + <v-dialog
3 + v-model="dialog"
4 + max-width="290"
5 + >
6 + <v-card>
7 + <v-card-title class="headline">Use Google's location service?</v-card-title>
8 +
9 + <v-card-text>
10 + Let Google help apps determine location. This means sending anonymous location data to Google, even when no apps are running.
11 + </v-card-text>
12 +
13 + <v-card-actions>
14 + <v-spacer></v-spacer>
15 +
16 + <v-btn
17 + color="green darken-1"
18 + text
19 + @click="dialog = false"
20 + >
21 + Disagree
22 + </v-btn>
23 +
24 + <v-btn
25 + color="green darken-1"
26 + text
27 + @click="dialog = false"
28 + >
29 + Agree
30 + </v-btn>
31 + </v-card-actions>
32 + </v-card>
33 + </v-dialog>
34 +</template>
35 +
36 +<script>
37 +export default {
38 + data(){
39 + return{
40 + dialog: false,
41 + }
42 + },
43 +}
44 +</script>
45 +
46 +<style lang="css" scoped>
47 +</style>
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
190 <v-list-item-title>이동</v-list-item-title> 190 <v-list-item-title>이동</v-list-item-title>
191 </v-list-item-content> 191 </v-list-item-content>
192 </v-list-item> 192 </v-list-item>
193 - <v-list-item @click.prevent="deleteF"> 193 + <v-list-item @click.prevent="delete_file">
194 <v-list-item-icon> 194 <v-list-item-icon>
195 <v-icon>mdi-delete</v-icon> 195 <v-icon>mdi-delete</v-icon>
196 </v-list-item-icon> 196 </v-list-item-icon>
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
198 <v-list-item-title>삭제</v-list-item-title> 198 <v-list-item-title>삭제</v-list-item-title>
199 </v-list-item-content> 199 </v-list-item-content>
200 </v-list-item> 200 </v-list-item>
201 - <v-list-item @click.prevent="deleteF"> 201 + <v-list-item @click.prevent="download_file">
202 <v-list-item-icon> 202 <v-list-item-icon>
203 <v-icon>mdi-download</v-icon> 203 <v-icon>mdi-download</v-icon>
204 </v-list-item-icon> 204 </v-list-item-icon>
...@@ -468,20 +468,16 @@ export default { ...@@ -468,20 +468,16 @@ export default {
468 console.log(error); 468 console.log(error);
469 } 469 }
470 }, 470 },
471 - async delete_file(itemName) { 471 + async delete_file() {
472 try { 472 try {
473 var itemlist = this.$store.getters.fileL; 473 var itemlist = this.$store.getters.fileL;
474 - console.log(itemlist);
475 - console.log(itemName);
476 const currentData = { 474 const currentData = {
477 fileName: null, 475 fileName: null,
478 user_id: null, 476 user_id: null,
479 cur: this.$store.state.cur, 477 cur: this.$store.state.cur,
480 }; 478 };
481 -
482 for (var i = 0; i < itemlist.length; i++) { 479 for (var i = 0; i < itemlist.length; i++) {
483 - console.log(itemlist[i].file_name); 480 + if (itemlist[i].file_name == this.cfilename.file_name) {
484 - if (itemlist[i].file_name == itemName) {
485 currentData.fileName = itemlist[i].file_name; 481 currentData.fileName = itemlist[i].file_name;
486 currentData.user_id = itemlist[i].user_id; 482 currentData.user_id = itemlist[i].user_id;
487 } 483 }
...@@ -490,23 +486,20 @@ export default { ...@@ -490,23 +486,20 @@ export default {
490 id: currentData.user_id, 486 id: currentData.user_id,
491 cur: currentData.cur, 487 cur: currentData.cur,
492 }; 488 };
493 - console.log(currentData);
494 const response = await deleteFile(currentData); 489 const response = await deleteFile(currentData);
495 setTimeout(function() {}, 500); 490 setTimeout(function() {}, 500);
496 const filelist = await file(filelistData); 491 const filelist = await file(filelistData);
497 - console.log(filelist.data.files);
498 this.$store.commit('setFile', filelist.data.files); 492 this.$store.commit('setFile', filelist.data.files);
499 - console.log(this.$store.getters.fileL);
500 this.files = this.$store.getters.fileL; 493 this.files = this.$store.getters.fileL;
501 } catch (error) { 494 } catch (error) {
502 console.log('에러'); 495 console.log('에러');
503 console.log(error); 496 console.log(error);
504 } 497 }
505 }, 498 },
506 - async download_file(namedata) { 499 + async download_file() {
507 try { 500 try {
508 const currentData = { 501 const currentData = {
509 - fileName: namedata, 502 + fileName: this.cfilename.file_name,
510 id: this.$store.state.id, 503 id: this.$store.state.id,
511 cur: this.$store.state.cur, 504 cur: this.$store.state.cur,
512 }; 505 };
......