Is there a cnfiguration variable... to overwrite any existing files/images of same filename?
Now a new file is created imagefile(1).png when the image already exists. Can I set a config somewhere to overwrite this action and just replace imagefile.png with the just the latest uploaded one?
Thanks! Love the package!
I couldn't find a configuration for that and I think it could be helpful so I've created a pull request that adds a configuration option via the force flag. This option would let you overwrite files with the same name in the upload directory. In case the contributors don't want this functionality or an easy fix you could do in the meantime is:
upload.on("begin", function(fileInfo) {
fileInfo.name = fileInfo.originalName;
})
Great feature! I'm using it. Thanks!
Thanks @brooklynb7. I really appreciate it 😁
Great Q&A, Helped me a lot,Thx!