-
Notifications
You must be signed in to change notification settings - Fork 71
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
Files with square brackets in their file names don't persist to Fedora #1309
Comments
Ah, I didn't look far enough back in catalina.out:
Unfortunately, the error message doesn't help much. So, an error was reported, but I'm not sure who dropped the ball. Perhaps the flysystem adapter... |
Looks like the form (
Just ignoring it. |
Flysystem is passing the namespaced path to Chullo (e.g. 'fedora://2019-10/test [with brackets].mp3'). Chullo is trying to use the same URI when POSTing the new resource. So, who's job is it to check valid file naming? Flysystem or Chullo? Chullo seems to be just a fairly thin API wrapper. I guess we need the Flysystem Adapter to enforce the file-naming business logic... |
Huh, Gemini seems to have a URL-encoded version of the Drupal URI, but not the Fedora one:
|
I think Flysystem should acknowledge that the save failed and report back why it failed. It shouldn't need to know about the underlying issues but it shouldn't mask them. |
It appears that Flysystem is reporting back an error. It is the file upload form that is ignoring the error, so this may have to be a core issue/patch. Unfortunately, I need to turn my attention to some other work tasks but I'll hopefully circle back to this sooner rather than later. |
This is a core issue. There are a couple of workarounds but they will require a bunch of testing. |
A third party module does the trick! https://www.drupal.org/project/transliterate_filenames It's a fix to use while we wait for it to be adopted into core (may take a while). I've tested it and it totally works and does exactly what we want. Sanitizes filenames on the way in and doesn't let you put in crazy characters, etc... Good stuff! |
Islandora-Devops/islandora-playbook#166 is ready to test with the fix. If you like it, merge Islandora/islandora#761 and delete the issue-1309 branches of islandora_defaults and islandora-playbook. |
Resolved via Islandora-Devops/islandora-playbook@d4c4167 |
I attempted to create a new media using a file with brackets in the filename
test [with brackets].mp3
. The Media upload form didn't complain and Drupal stated that the Media was created. Drupal will show the media page (once you fix #1308); however the Fedora binary resource does not exist.I'm not seeing any messages that the file failed to be loaded into Fedora (I've checked Drupal's logs and Catalina); it simply complains when it can't find it.
The text was updated successfully, but these errors were encountered: