django-filer icon indicating copy to clipboard operation
django-filer copied to clipboard

add this really basic generate_filename method to filer.utils

Open benzkji opened this issue 9 years ago • 6 comments

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?

benzkji avatar Jun 13 '15 07:06 benzkji

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

yakky avatar Jun 14 '15 08:06 yakky

any hints where the current utils.generate_filename.py methods are tested, so I have any guidance how to implement those tests?

benzkji avatar Jun 15 '15 18:06 benzkji

@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.

benzkji avatar Aug 12 '16 07:08 benzkji

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.

stale[bot] avatar Jul 28 '22 19:07 stale[bot]

@jrief what are your thoughts about these?

benzkji avatar Aug 01 '22 11:08 benzkji

#543

benzkji avatar Aug 01 '22 11:08 benzkji

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.

stale[bot] avatar Oct 31 '22 00:10 stale[bot]

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.

stale[bot] avatar Feb 02 '23 20:02 stale[bot]

This will now be closed due to inactivity, but feel free to reopen it.

stale[bot] avatar Mar 02 '23 23:03 stale[bot]