Closed miqrogroove closed 2 years ago
original filename is read-only and derived from the as-uploaded name.
If the file name doesn't include spaces and ampersands, it works?
If the file name doesn't include spaces and ampersands, it works?
Spaces are being replaced by underscore _
which I would consider reasonable. I haven't tested any other chars, but I do have many files with &
in the name.
And yes, it works without ampersands.
Got it thanks. We will resolve.
Workaround 2: Edit the downloaded_file_naming
preference in themes/default/conf/app.conf
Workaround 3: at https://github.com/collectiveaccess/pawtucket2/blob/84dbafa54fa2b7724931ab5d992fc9a7a248a01e/themes/default/views/Details/object_representation_download_binary.php#L37 ... Change the whole line as follows ...
$dname = htmlspecialchars_decode($this->getVar('version_download_name'), ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401);
$dname = str_replace('"', '_', $dname);
header("Content-Disposition: attachment; filename=\"$dname\"");
Pushed changes to resolve this to master.
Steps to reproduce bug:
John & Jane.pspimage
Expected result:
Actual result:
John_&
with incomplete name and no extension.Workaround:
It would be necessary to change the filename prior to upload. I had attempted to add the
Original filename
field to the Object representation editor; it displays the name but will not save any changes.