-
Bug
-
Resolution: Fixed
-
Major
-
1.0
If you upload any file to Assets via the admin site, without a web-safe filename – that is, anything that falls foul of regex /[0-9A-Za-z_-]+/ – the system will attempt to convert the filename for you but silently fails to actually do so, even though the displayed filename appears to conform to the rule above.
However, you cannot be served the file via the public site via the DAM as it will fail to be found (404).
If you click the Rename Asset link (with the file selected) you will note it still has the original unsafe filename.
The temporary workaround we're using for this is as follows:
If the asset has already been uploaded:
• Click Rename Asset and give it a web-safe filename.
• Click Edit Asset and give it the same web-safe filename in the Media > Name field (yes, you must to both these renaming actions in this order).
• Publish.
If the asset has not yet been uploaded:
• Upload the asset but change the filename to a safe one in the Media > Name field before saving changes.
• Publish the asset.
========
Steps to reproduce on the demo site http://demo.magnolia-cms.com as follows:
• Go to the Assets page.
• Into demo-project/downloads, upload any random file whose name is valid, eg "this-is-ok.txt".
• Publish the asset.
• Confirm you're offered the file for download via the public url, eg: http://demo.magnolia-cms.com/dam/demo-project/downloads/this-is-ok.txt
• Now upload another file whose name is invalid, eg "spaces in this name.txt".
• Publish the asset.
• Confirm you CANNOT reach the file for download via the public url, eg: http://demo.magnolia-cms.com/dam/demo-project/downloads/spaces%20in%20this%20name.txt
• Now click [Edit Asset] and give it a safe name, eg "no-spaces-in-this-name", and click [Save Changes].
• Notice the Asset Name in the list/tree view of Assets has NOT changed.
• Click [Rename Asset], notice the Name is actually correct, and click [Save Changes] without doing anything else.
• Notice the Asset Name in the list/tree view of Assets has changed to the new value.
• Publish the asset.
• Confirm you're now offered the file for download via the public url, eg: http://demo.magnolia-cms.com/dam/demo-project/downloads/no-spaces-in-this-name.txt
========
Issues possiblly related?
https://jira.magnolia-cms.com/browse/MGNLFORM-208
https://jira.magnolia-cms.com/browse/MGNLDAM-310
https://jira.magnolia-cms.com/browse/MGNLDAM-423
- is duplicated by
-
MGNLDAM-487 Documents with national characters in name can't be downloaded from dam
- Closed