Hey, firstly thanks for this library, it is very useful.
I find out a situation where you can get a race condition. When you receive simultaneously multiple requests where each request has same originalName the target file will be overridden and thus the application can crash later on.
Hey, firstly thanks for this library, it is very useful.
I find out a situation where you can get a race condition. When you receive simultaneously multiple requests where each request has same
originalName
the target file will be overridden and thus the application can crash later on.These lines are responsible for that:
https://github.com/dmitriy-nz/nestjs-form-data/blob/ecf063c4c5d58673f7a135ecd975dab592e1f69c/src/classes/storage/FileSystemStoredFile.ts#L18-L21
I propose the way of generating UUID for it instead of using original name of the file. It can be also a security issue probably, but I am not sure.
If you want I can make a PR.
Thanks!