Koha::UploadedFile - Koha::Object class for single uploaded file
use Koha::UploadedFile; # store record in uploaded_files my $upload = Koha::UploadedFile->new({ [columns and values] }); # get a file handle on an uploaded_file my $fh = $upload->file_handle; # get full path my $path = $upload->full_path; # delete uploaded file $upload->delete;
Allows regular CRUD operations on uploaded_files via Koha::Object / DBIx.
The delete method also takes care of deleting files. The full_path method returns a fully qualified path for an upload.
Additional methods include: file_handle, httpheaders.
Delete uploaded file. It deletes not only the record, but also the actual file (unless you pass the keep_file parameter).
Returns number of deleted records (1 or 0E0), or -1 for unknown. Please keep in mind that a deleted record does not automatically imply a deleted file; a warning may have been raised. (TODO: Use exceptions.)
Returns the fully qualified path name for an uploaded file.
Returns a file handle for an uploaded file.
httpheaders returns http headers for a retrievable upload.
Will be extended by report 14282
Returns root directory for permanent storage
Returns name of corresponding DBIC resultset
Marcel de Rooy (Rijksmuseum)
Koha Development Team