VichUploaderBundle
VichUploaderBundle copied to clipboard
[RFC] File namer for uniquely suffixing a file name if it is already taken
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.
Yup, I also think that this feature would be useful. Feel free to submit a PR :+1:
Ping ?
Let me see if I can whip up a PR this weekend
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.
Any news on this?
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