Skip to content

Commit

Permalink
Merge pull request CSID-DGU#62 from yebin-jeong/main
Browse files Browse the repository at this point in the history
[Feature] CSID-DGU#26 - 이미지 μ—…λ‘œλ“œ μˆ˜μ •
  • Loading branch information
yebin-jeong authored Nov 30, 2024
2 parents fa512d6 + 09027e7 commit d285b18
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 d285b18

Please sign in to comment.