Describe the bug
I noticed that the module named FilesS3PresignedModule (and its corresponding service/controller) is not actually implementing a "Presigned URL" strategy.
Instead, it is using MulterModule with multer-s3. This setup implements a server-side streaming upload strategy, where the client sends the file to the NestJS server, and the server proxies it to S3.
To Reproduce
Check the FilesS3PresignedModule configuration:
@Module({
imports: [
// ...
MulterModule.registerAsync({
// ...
useFactory: (configService: ConfigService<AllConfigType>) => {
return {
// This indicates a server-side upload via Multer middleware
storage: multerS3({
s3: s3,
bucket: '',
// ...
}),
};
},
}),
],
// ...
})
export class FilesS3PresignedModule {}
Expected behavior
A module named "Presigned" implies a Client-Side Direct Upload strategy.
The client requests an upload URL.
The backend generates a pre-signed URL (using getSignedUrl or signatureUrl) and returns it as JSON.
The client uploads the file directly to S3/OSS.
Multer should not be involved in a presigned flow because the file binary data never touches the backend API.