Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ri-FE-01 into feature/CSID-DGU#6
  • Loading branch information
Minn-Choi committed Dec 2, 2024
2 parents 747d791 + d285b18 commit 0161c63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/views/akopolio/Edit/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,13 @@ export default {
images.value.splice(index, 1);
};

const prefix = 'images';
const uploadImages = async () => {
const uploadedUrls = [];
for (const image of images.value) {
try {
const { data } = await axios.post(
`${process.env.VUE_APP_BE_API_URL}/api/get-presigned-url`,
`${process.env.VUE_APP_BE_API_URL}/file/${prefix}/presigned-url`,
{
fileName: image.name,
fileType: image.file.type,
Expand Down
3 changes: 2 additions & 1 deletion src/views/akopolio/create/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,15 @@ export default {
this.images.splice(index, 1);
},
async uploadImages() {
const prefix = 'images';
const uploadedUrls = [];

for (const image of this.images) {
try {
// 1. 프리사인드 URL 요청

const { data } = await axios.post(
`${process.env.VUE_APP_BE_API_URL}/api/get-presigned-url`,
`${process.env.VUE_APP_BE_API_URL}/file/${prefix}/presigned-url`,
{
fileName: image.name,
fileType: image.type,
Expand Down

0 comments on commit 0161c63

Please sign in to comment.