[Koha-bugs] [Bug 19318] Add ability to use custom file upload paths

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Dec 21 17:11:18 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19318

--- Comment #18 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 128846
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128846&action=edit
Bug 19318: Normalize uploaded file name

The uploaded file name can appear in the MARC record (if using the
upload plugin), and all the strings in the MARC record are normalized
using Unicode::Normalize::NFC.
So the file name must be normalized everywhere (in the filesystem and in
the uploaded_files table too).

Test plan:
1. Create a file whose name contains combining characters. For instance:
   echo 'contents' > $(perl -e 'print "cine\x{cc}\x{81}ma"')

   0xcc 0x81 is utf8 for "Combining acute accent" (́ )
   https://unicode-table.com/fr/0301/
   Once normalized it should be 0xc3 0xa9 (é)

2. Use the upload tool to upload this file
3. Verify on your filesystem that the filename is normalized
   % ls cin* | xxd
   00000000: 6369 6ec3 a96d 610a                      cin..ma.
                    ^^ ^^
4. If you have configured the storage with a `baseurl`, use the upload
   cataloguing plugin, and verify that the generated URL works correctly

Signed-off-by: Nick Clemens <nick at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list