VichUploaderBundle icon indicating copy to clipboard operation
VichUploaderBundle copied to clipboard

[RFC] File namer for uniquely suffixing a file name if it is already taken

Open benglass opened this issue 9 years ago • 6 comments

A common piece of functionality for file upload would be to keep the file's original name unless there is already a file with that name, in which case add a unique suffix (numeric or something like that). This would be similar to how browsers handle file downloads when you already have a file of that name. I have a namer that already does this if there is interest I can clean it up and submit a PR.

benglass avatar Jul 08 '15 19:07 benglass

Yup, I also think that this feature would be useful. Feel free to submit a PR :+1:

K-Phoen avatar Jul 11 '15 22:07 K-Phoen

Ping ?

K-Phoen avatar Aug 05 '15 06:08 K-Phoen

Let me see if I can whip up a PR this weekend

benglass avatar Aug 05 '15 14:08 benglass

Perfect :)

Don't hesitate to open a PR even if it's still WIP, I can help you if you don't have enough time.

K-Phoen avatar Aug 05 '15 14:08 K-Phoen

Any news on this?

garak avatar Dec 30 '16 11:12 garak

Namers hasn't know anything about storage. We need inject storage into namer for checking if file already exists. But this is not enough: we also need inject directory namer for getting full path. I think that this is hard to resolve and you can just use HashNamer from #622

Koc avatar May 08 '17 16:05 Koc