Skip to content

Commit

Permalink
Merge pull request #424 from code4romania/fix/remove-files-originalname
Browse files Browse the repository at this point in the history
fix: remove files original name to avoid invalid URLs in S3
  • Loading branch information
radulescuandrew authored Dec 20, 2023
2 parents 5372a57 + d5c76ed commit fd4e828
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 fd4e828

Please sign in to comment.