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
Specify a custom directory for each upload #62
Comments
Related. I'm trying to set the uploader.dir in the uploadValidator similar to the documentation example: I can debug output the value of uploader.dir and it is what I want, but the files are not uploaded into that directory. In fact, they go nowhere (apparently) unless I set uploader.dir "globally". (Just after instantiation to apply to all files.) So I'd like to see setting upload.dir in uploadValidator work. Perhaps I misunderstand @vote539 , but allowing the upload dir to be specified per file suggests the client sends this value. That seems like a not-so-secure thing to do. |
For now, I recommend uploading all files to a default central location and then moving them to where you actually want them when done. The example in the docs is not safe and should be removed. I'll do that soon. |
Previous code sample had race condition; see #62. Added note that the "saved" event can be used to move the file.
This event should be able to be used to move the file. See #62
I published v0.6.2 which allows you to use the "saved" event on the server to move the file. |
The example for
uploadValidator
sets the globaluploader.dir
property on the fly, which can have a race condition for two simultaneous uploads. A better approach would be to allow every file to have its own custom directory to override the global setting.See #58 and #60
The text was updated successfully, but these errors were encountered: