[FeatureRequest] When using UpLoadFile.save
and file already exists, rename file
#151
Labels
enhancement
New feature or request
Heyho, I just stumbled over this while implementing file upload in my web-application:
Django has a very neat convenience functionality, which, if you try to upload a file into a directory and a file with that name already exists in there, it appends random character's between the file name and its extension in order to avoid overwriting a file that already exists.
I wanted to bring up the idea of whether it might be sensible to extend the
save
function incontext.nim
to do something similar. However, I'm not 100% convinced it would actually be a good fit for the framework since, while it is useful, it also is something that might not fit into a vision if prologue is desired to remain slim and uncomplicated. That's partially what I wanted to discuss by opening this issue.Either way, right now I have implemented it myself like this:
The text was updated successfully, but these errors were encountered: