-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
How to change file name after completed upload? #72
Comments
Have you found a solution? I think you only need to make a separate Http request to the server with a new file name or you can rename it before the upload. |
The problem is that in my case the server determines the new file name based on a hash calculated based on its content. This (for large files rather heavy computation) should always be carried out server-side. A (rather hacky) solution would be to emit an server-side event to the client using sockets. I however think that this should be done through the flow.js API. |
So it is even simpler, you just need to wait for upload to be completed.
|
Works like a charm, thanks! 👍 |
I have problem similar to flowjs/flow-php-server#10.
I use the Nodejs example (https://github.com/flowjs/flow.js/tree/master/samples/Node.js) as foundation for my server and everything works fine. When all chunks are uploaded, I assemble the file and then I rename it based on a hash calculated using the file content.
How can I let flow.js know that the file name was changed manually and how can I add this information on an event (e.g.
fileSuccess
). I assume the proper way would be to change the filename in the result object.The corresponding method in the
app.js
node server is:I've uploaded the entire file as Gist here: https://gist.github.com/Powernap/36c9b7b1701016ddc03d
The text was updated successfully, but these errors were encountered: