My filename was Q82_Q83_1_+_1_=_2_Foto_Kruis_en_Mol.jpg I'm suspecting that either the + or the = in the file name is causing issues. All other files seem to work fine
Note: i haven't reproduced this in an isolated instance.
This shouldn't be an issue soon:
@benhaynes
- "Original" filenames should be sanitized
We can use any approach but we are recommending to use this!
Cause if we use UUID names then the name of the file will become different random string from which the user uploaded!
Let me know your thoughts!
I recommend the UUID approach, because if a user uploads a library of images [image1,image2,image3] then anyone who loads image1 will see _/images/originals/image1.jpg and could then increase the number to get the next image.
Unless we never return the original file and instead stream it through an authenticated file.
Image.php?file=image1, would then check if the user has access to image1 instead of just displaying the original image, and if you increase the filename to image2, you don't have access, therefore, couldn't see it.
I think UUID is a more _secure_ option for file naming (for a default setting)... but we should keep the option to use the Original file name too.
In case the user try to upload the same file many times, the system will check an existent file with the same hash and not duplicate the file or it will upload the same file again?
We had a hash of the file to do this, but have disabled it since hashing the file contents was not performant enough. We can revisit this later though.
I was hoping that this would give us a clear default for naming... but as of now it's exactly 50/50!
https://twitter.com/directus/status/1139618994879696897
UUID seems like a "safer" default, but we need to still support "Original" as a Global Setting. BUT, let's wait the last 4 days of the poll and see what we get!
but have disabled it since hashing the file contents was not performant enough.
For files 20mb+ *
It will be fixed with the development of #337
Fixed in #1059
Most helpful comment
I recommend the UUID approach, because if a user uploads a library of images
[image1,image2,image3]then anyone who loadsimage1will see_/images/originals/image1.jpgand could then increase the number to get the next image.Unless we never return the original file and instead stream it through an authenticated file.
Image.php?file=image1, would then check if the user has access to image1 instead of just displaying the original image, and if you increase the filename to image2, you don't have access, therefore, couldn't see it.