1 package Koha::UploadedFiles;
3 # Copyright Rijksmuseum 2016
5 # This file is part of Koha.
7 # Koha is free software; you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 3 of the License, or (at your option) any later
12 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along
17 # with Koha; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 use Koha::UploadedFile;
25 use parent qw(Koha::Objects);
29 Koha::UploadedFiles - Koha::Objects class for uploaded files
33 use Koha::UploadedFiles;
41 =head2 INSTANCE METHODS
43 =head3 delete, delete_errors
45 Delete uploaded files.
46 Returns true if no errors occur.
47 Delete_errors returns the number of errors when deleting files.
53 # We use the individual delete on each resultset record
55 while( my $row = $self->_resultset->next ) {
56 my $kohaobj = Koha::UploadedFile->_new_from_dbic( $row );
57 $err++ if !$kohaobj->delete;
59 $self->{delete_errors} = $err;
65 return $self->{delete_errors};
72 Returns name of corresponding DBIC resultset
77 return 'UploadedFile';
82 Returns name of corresponding Koha object class
87 return 'Koha::UploadedFile';
92 Marcel de Rooy (Rijksmuseum)