Replies: 1 comment
-
If you use custom path generator avoid naming collisions is at your own risk e.g. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So prevent masses of directories, I use a custom path generator. In my case it is ../year/month/name.jpg
e.g.
../2023/02/spatie-logo.png
As users often upload the same image/pdf to multiple models, this can lead to the first being overwritten.
Could a config be added to 'check if file exists' and throw an error, or possibly a config to auto increment file name if a collision occurs. i.e. if
../2023/02/spatie-logo.png
exists, it will try../2023/02/spatie-logo-1.png
then../2023/02/spatie-logo-2.png
etcBeta Was this translation helpful? Give feedback.
All reactions