Skip to content

Commit

Permalink
πŸ› Fix: κ²Œμ‹œλ¬Ό s3 url μˆ˜μ •(#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
go-tiger committed Aug 30, 2024
1 parent 6fcfcad commit 5fb9f01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/nest/domain/post/service/post.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class PostService {
const menuTagId = menuData.map((menu) => menu.id.toString()).join(',');

const uploadToimage = files.map(async (file) => {
const key = `places/${isPlaceData.id.toString()}/${Date.now()}-${Math.random().toString(16).slice(2)}${path.extname(file.originalname)}`;
const key = `/places/${isPlaceData.id.toString()}/${Date.now()}-${Math.random().toString(16).slice(2)}${path.extname(file.originalname)}`;
await this.s3Service.uploadS3(key, file.buffer, file.mimetype);
return S3URL + key;
});
Expand Down Expand Up @@ -160,7 +160,7 @@ export class PostService {
if (files && files.length > 0) {
const S3URL = this.configService.get<string>('ENV_AWS_S3_URL');
const uploadToimage = files.map(async (file) => {
const key = `places/${id.toString()}/${Date.now()}-${Math.random().toString(16).slice(2)}${path.extname(file.originalname)}`;
const key = `/places/${id.toString()}/${Date.now()}-${Math.random().toString(16).slice(2)}${path.extname(file.originalname)}`;
await this.s3Service.uploadS3(key, file.buffer, file.mimetype);
return S3URL + key;
});
Expand Down

0 comments on commit 5fb9f01

Please sign in to comment.