Create the option to save the uploaded cover files with the rest of the files. Removing them from saving on the DB and save them on the koha uploads directory. Giving the implementation of creating cache miniatures for using them. There must be an option to enable this feature or not for backward compability.
Do you plan to add records too in uploaded_files table ?
In the current flow the files are added on the uploaded_files tables. The only difference is that they are with permanent = 0 instead of permanent = 1
(In reply to Rodrigo Santellan from comment #2) > In the current flow the files are added on the uploaded_files tables. The > only difference is that they are with permanent = 0 instead of permanent = 1 The permanent=0 files are stored in another file location (/tmp) and are meant to be removed after some defined number of days (work in progress). Just need to add a cron job for that.
Created attachment 57596 [details] Search a cover image. Final look for re utilizing cover images.
I added an image to what I want to achieve. The main goal is to re utilize the same image for different biblios without adding them multiple times.
Created attachment 57598 [details] [review] Bug 17650 - Create the option to save the cover with the uploaded files. Create the option to save the uploaded cover files with the rest of the files. Removing them from saving on the DB and save them on the koha uploads directory. Giving the implementation of creating cache miniatures for using them. Added an option on System Preferences to enable this new feature: SaveCoverOnDisk
The Images.t should pass as usual.
tools/upload-file.pl Remove Dumper and warn please Also from tools/upload-cover-image.pl and file-search INSERT INTO biblioimages (biblionumber, mimetype, imagefile, thumbnail, uploadedfileid) The mix of upload and biblioimages like this does not look good to me. Isn't this just a new type of cover images to be triggered by a new pref somewhere else? Discussion ?? In _retrieve_thumbs_images you seem to copy/save the file somewhere else outside the uploads dir ? tools/file-search.pl Converted to new plugin style (Bug 13437) ??? $debug or $debug = $input->param('debug') || 0; ??? use warnings; no warnings 'redefine'; # otherwise loading up multiple plugins fills the log with subroutine redefine warnings Hmm Did you test this under Plack too?
Yes I tested under plack and is working. I save on /tmp the thumbnail of the image to not process it multiple times.
Patch didn't apply in the sandbox. Some problems occurred applying patches from bug 17650: <h1>Something went wrong !</h1>Applying: Bug 17650 - Create the option to save the cover with the uploaded files. .git/rebase-apply/patch:69: trailing whitespace. ->png(), ); .git/rebase-apply/patch:73: trailing whitespace. .git/rebase-apply/patch:97: trailing whitespace. ->{'imagefile'} = ; .git/rebase-apply/patch:157: trailing whitespace. ALTER TABLE .git/rebase-apply/patch:159: trailing whitespace.
Created attachment 80745 [details] [review] Bug 17650 - Create the option to save the cover with the uploaded files. Create the option to save the uploaded cover files with the rest of the files. Removing them from saving on the DB and save them on the koha uploads directory. Giving the implementation of creating cache miniatures for using them. Added an option on System Preferences to enable this new feature: SaveCoverOnDisk
Hopefully rescued correctly. The move of javascript to the bottom broke the application.
Can I get some test steps for this?
Hi, I was just wondering if someone could provide some test steps for this please?
The patch applies fine (wow), and I have one suggestion right off the bat: The system preference should be worded and structured in a way that it is a sentence. Instead of: [Yes/No] Save the covers on the the hard disk instead of the database. It should be something like: Save cover images on the [hard disk/database]. Would it be clearer to say "server file system" instead of "hard disk?" Could people be confused that it referred to their own hard disk? I ran into a problem, though, as soon as I navigated to the 'Upload local cover image' page: Can't locate Koha/Upload.pm in @INC
This functionality would interest us. We're trying to reduce the imprint of biblioimages on our database size. Is there a reason the QA could already forewarn us about that this idea (moving biblioimages outside the DB) would gain no traction? Not sure if the current implementation is the right way, but we'd add a script to move the current biblioimages out, as well.
> Is there a reason the QA could already forewarn us about that this idea > (moving biblioimages outside the DB) would gain no traction? I think it would make sense to have this at least as an option. Not sure if or how existing installations could be switched over. Adding some more CC.