Skip to content

Commit

Permalink
fix: remove files original name to avoid invalid URLs in S3
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Radulescu committed Dec 20, 2023
1 parent 5372a57 commit d5c76ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/shared/services/s3-file-manager.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class S3FileManagerService {
const params: FileUploadParams[] = files.map((file) => ({
Body: file.buffer,
Bucket: this.configService.get('AWS_S3_BUCKET_NAME'),
Key: `${path}/${uuid()}-${fileName || file.originalname}`,
Key: `${path}/${uuid()}`,
}));

// Prepare upload
Expand Down

0 comments on commit d5c76ed

Please sign in to comment.