How to prevent file upload if profile creation fails in NestJS using FileInterceptor?
I’m working on a NestJS application where I need to handle file uploads using the FileInterceptor from @nestjs/platform-express. Specifically, I am building a profile creation route that accepts both form data and a profile picture. Here’s the relevant code:
Here is my controller