kbpark9898

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

......@@ -3,7 +3,7 @@ const router = express.Router();
const AWS = require("aws-sdk");
const moment = require("moment");
const BUCKET_NAME = "hong-s3-cloud";
const BUCKET_NAME = "qkrrlqja-test";
let curPath = "";
let user_id = "";
let parentPath = "";
......@@ -340,4 +340,4 @@ router.get('/search', function(req, res, next) {
});
module.exports = router;
\ No newline at end of file
module.exports = router;
......
{
"accessKeyId": "ASIAXZL2SWFEYG2GUYVJ",
"secretAccessKey": "ceYvfLs25iiBDfigO7PbP67kJoKswJdfduqROrJt",
"sessionToken": "FwoGZXIvYXdzEDMaDGvezwF9kQrAJ+uhfSLDASWFKBk7UNbRzZVEM1eoGJ3E+UI9d4xSpqEDqRYjsOTn5wYIGM3mUCZ8S6/XCnGP5yFz+qv9mBLDf311iP9ajY091OhQ8c2nB6l+JHuRKAz6FhGLrjHtD1AecHtjHOu5dXODU2+9ctvGj7V60KYqjToah5Tvv84EVac/41Les3rtrqcXS/bbmVwv5kDz9K1FJStln4sXZ/foueGHZAkAJQ6LAtIQWg4/reFUcWAi8E0bUjMckmymDQhnVNWcSbgQ+htBYiiPg+P2BTItOqWuZojM5lw32rTv7+PuOaeyHjx3+Vcd4bo3orSJr57P2ZPfmglZNKY7W5aw",
"accessKeyId": "ASIAXZL2SWFEZSIHHRDT",
"secretAccessKey": "cdcXCezNz9OhFowZxE2KSftDmT3xSYAtiLJl1dFk",
"sessionToken": "FwoGZXIvYXdzEJf//////////wEaDG1NOyJj0/Xdzqu+uyLDAa8vgymCVldXPpET+AOsq5CXhMzhMEDmWogIaq6lWJVy8sdnK9tOXY/u9vz8p6cTm7xWb0YiX6TKDhlfFZX6ynv0Xw/p/qvbn4lPsoT8K9PpdDOWJUMA8qX/5RrKNO4OAolUkw+EMjQbK38u+g3HEVP8mo+DiGLrBGj+0Ar0xhGiU/Lg5qKRdp+tEYIn0ypDNu/2q13apRiMH7n+OVFzilil10g1qq8NLaW98QvVC4xRIgkjAMcRqA9yPdVrhc9yFyqjrCjA+vj2BTIt8CDkFsEAFqJR3W0YPDbsu2YdTq3SKgpOsxNXGsEFMaEhFxodp5/Qsk7tfMsO",
"region": "us-east-1"
}
......
this is the second test edit
\ No newline at end of file
......@@ -17,7 +17,7 @@
var AWS = require('aws-sdk');
AWS.config.update({ region: 'ap-northeast-2' });
var BUCKET_NAME = 'khuloud';
var BUCKET_NAME = 'qkrrlqja-test';
var s3 = new AWS.S3();
var fs = require('fs');
......
<template lang="html">
<v-dialog
v-model="dialog"
max-width="290"
>
<v-card>
<v-card-title class="headline">Use Google's location service?</v-card-title>
<v-card-text>
Let Google help apps determine location. This means sending anonymous location data to Google, even when no apps are running.
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="green darken-1"
text
@click="dialog = false"
>
Disagree
</v-btn>
<v-btn
color="green darken-1"
text
@click="dialog = false"
>
Agree
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
export default {
data(){
return{
dialog: false,
}
},
}
</script>
<style lang="css" scoped>
</style>
......@@ -190,7 +190,7 @@
<v-list-item-title>이동</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-list-item @click.prevent="deleteF">
<v-list-item @click.prevent="delete_file">
<v-list-item-icon>
<v-icon>mdi-delete</v-icon>
</v-list-item-icon>
......@@ -198,7 +198,7 @@
<v-list-item-title>삭제</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-list-item @click.prevent="deleteF">
<v-list-item @click.prevent="download_file">
<v-list-item-icon>
<v-icon>mdi-download</v-icon>
</v-list-item-icon>
......@@ -468,20 +468,16 @@ export default {
console.log(error);
}
},
async delete_file(itemName) {
async delete_file() {
try {
var itemlist = this.$store.getters.fileL;
console.log(itemlist);
console.log(itemName);
const currentData = {
fileName: null,
user_id: null,
cur: this.$store.state.cur,
};
for (var i = 0; i < itemlist.length; i++) {
console.log(itemlist[i].file_name);
if (itemlist[i].file_name == itemName) {
if (itemlist[i].file_name == this.cfilename.file_name) {
currentData.fileName = itemlist[i].file_name;
currentData.user_id = itemlist[i].user_id;
}
......@@ -490,23 +486,20 @@ export default {
id: currentData.user_id,
cur: currentData.cur,
};
console.log(currentData);
const response = await deleteFile(currentData);
setTimeout(function() {}, 500);
const filelist = await file(filelistData);
console.log(filelist.data.files);
this.$store.commit('setFile', filelist.data.files);
console.log(this.$store.getters.fileL);
this.files = this.$store.getters.fileL;
} catch (error) {
console.log('에러');
console.log(error);
}
},
async download_file(namedata) {
async download_file() {
try {
const currentData = {
fileName: namedata,
fileName: this.cfilename.file_name,
id: this.$store.state.id,
cur: this.$store.state.cur,
};
......