-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closes #3096 Simple file system configuration change to sanitize uploaded filenames. #3180
Conversation
Do we want to enable all the "Sanitize filenames" settings? I'm wondering in particular about the "Convert to lowercase" setting. |
Please commit the suggestion here: #3180 (comment) |
I do think it would be good to enable these settings by default on new site installs. We don't necessarily want to enable these settings on existing sites though. |
I was thinking we did this in Quickstart 1 but it looks like all we did was include the contrib Transliteration module but it wasn't installed by default. When that module was installed on Quickstart 1 its default settings basically match what is in this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested multiple filename patterns for upload(space, dash, underscore) , works as described
Check if this needs to be in the Quickstart folder. Test against existing site to ensure compatibility. This is not a retroactive change. Will only work with new file uploads after this is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this, and it appears to apply the configuration update on sites that existed before this setting existed.
Site that I tested on began its life in drupal core 10.1.7
The setting edited in this PR was introduced in Drupal core 10.2.x
Look into:
|
8f1c6dd
Updated the character casing check to not force to lower. |
Description
Related issues
#3096
How to test
Add any node content that contains a media file field.
Select file upload and select a local image file with a whacky file name ( spaces, special characters)
[upload]
Observe the new file name all cleaned up. Example: spaces are now "-"s.
Also test the replacing of document files while preserving the filename (using the functionality from the Media Entity File Replace module).
Updated: Uploaded file character casing remains untouched.
Types of changes
Arizona Quickstart (install profile, custom modules, custom theme)
Drupal core
Drupal contrib projects
Checklist