You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a project, I need to be able to display assets in the browser (they are PDF files).
Due to these PDF files being technical documents, there are already QR codes made for these files (mywebsite.test/files/MyFile.pdf)
As you can see they are camel-cased.
When uploading an asset, Statamic does: in_array(trim(strtolower($file->getClientOriginalExtension())), $extensions).
So I cannot upload files with uppercased characters in the filename.
For me, this is an issue at the moment, but it's pretty niche of course.
I would like to propose a new setting on the asset container that makes us able to toggle between allowing and disallowing uppercased characters? Of course defaulting to uppercase not allowed.
Again, this is a niche problem, but maybe something other people will run into as well.
Where the code is located: src/Validation/AllowedFile/IsAllowed()
You can opt-out of filenames being converted to lowercase, by toggling the lowercase config option in your config/statamic/assets.php config file.
/*|--------------------------------------------------------------------------| Enforce Lowercase Filenames|--------------------------------------------------------------------------|| Control whether asset filenames will be converted to lowercase when| uploading and renaming. This can help you avoid file conflicts| when working in case-insensitive filesystem environments.|*/'lowercase' => true,
For a project, I need to be able to display assets in the browser (they are PDF files).
Due to these PDF files being technical documents, there are already QR codes made for these files (
mywebsite.test/files/MyFile.pdf
)As you can see they are camel-cased.
When uploading an asset, Statamic does:
in_array(trim(strtolower($file->getClientOriginalExtension())), $extensions)
.So I cannot upload files with uppercased characters in the filename.
For me, this is an issue at the moment, but it's pretty niche of course.
I would like to propose a new setting on the asset container that makes us able to toggle between allowing and disallowing uppercased characters? Of course defaulting to uppercase not allowed.
Again, this is a niche problem, but maybe something other people will run into as well.
Where the code is located:
src/Validation/AllowedFile/IsAllowed()
It looks like this;
The text was updated successfully, but these errors were encountered: