C4::UploadedFile has a FIXME to allow for the permanent storage up user-uploaded files. Currently, all files are stored in /tmp, which is wiped on reboot on many (all?) Linux distros. Enabling permanent storage of user-uploaded files would allow for non-database storage of all variety of media.
This could be as simple as adding a flag to the new() routine of the UploadedFile object to indicate permanent or temporary. That, along with a directory defined in koha-conf.xml, may be sufficient.
There are different mechanisms now to upload files to Koha, features I can think of are:
- local cover images (implemented)
- patron images (implemented)
- uploading files for marc records (bug 6874)
- uploading PDF files for patron records (bug 8130)
Can this bug be closed? Do we we need a unified way to upload files to Koha as there might be more use cases in the future?
Koha::Upload now allows you to store an upload permanently within a defined category.