django-filer
django-filer copied to clipboard
add this really basic generate_filename method to filer.utils
this works for me: https://gist.github.com/benzkji/5f14fef05021f325c7ef
is there anything speaking against using filer like this? I prefer a clean url, and the randomized approch looks ok for always keeping the original filename, but the url is impossible to remember, and for example type manually, or send in a e-mail. the only drawback I know, is that the storage enginge itself adds a filename_5charshash.ext when there is a file with the same name already existing.
if this looks ok, could we add no_subfolders
to filer.utils.generate_filename.py?
Filer is capable of handling such file naming conflicts and it's entirely possible to add this to core. It will need docs and tests before merging, though
any hints where the current utils.generate_filename.py methods are tested, so I have any guidance how to implement those tests?
@yakky or, asked differently, what do you expect to test? I dont see any tests for the current generate_filename methods? A small hint in the docs ( http://django-filer.readthedocs.io/en/latest/settings.html#filer-storages ) of the available options (by_data, randomized, no_subfolders or flat) would be good though.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@jrief what are your thoughts about these?
#543
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This will now be closed due to inactivity, but feel free to reopen it.