-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to append request.id
/ other unique ID to onFile
?
#427
Comments
As far as I know, based on the source code, if you use req.saveRequsteFiles() ,names of those files may be unique ids.
|
Hey, Thanks, yes, I know all this, and even now I can use any unique filename when I'm storing it in on the disk. The problem is that I don't see a way to send this ID "back" to route, or get it from route. |
I haven't used the original fastify, but in Nestjs, the request instance can be obtained in route. |
Thanks, but I need solution for Fastify. |
Can I ask for comments please, does it makes sense? |
Storing an uploaded file within its original file name is problematic.
I think we could implement the context binding for the
|
Created pull request, not sure if I should bump |
Prerequisites
Issue
On file function gets only
part
and based on filename, you can then save the file to disc etc. This solution is good if the file names are unique, but when 2 users will send the file with the same name, it would become problematic.It would be good if second param with
req.id
or other unique ID that would allow to trace the file back to request.If there is other/easier way - pls let me know. Thanks!
The text was updated successfully, but these errors were encountered: