API:EPrints/DataObj/UploadProgress
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
NAME
EPrints::DataObj::UploadProgress - uploads-in-progress state
DESCRIPTION
This is an internal class, which inherits from EPrints::DataObj. It is just for managing the progress of files being uploaded to EPrints.
CORE METADATA FIELDS
progressid (text)
The unique identifier for an upload progress. This is a 32-character hexadecimal string.
expires (int)
The time (in seconds since the start of the last epoch) when this upload progress will expire if it is not completed.
size (bigint)
The total size in bytes of the file being uploaded.
size (bigint)
The number of bytes of the file being uploaded that have already been received.
REFERENCES AND RELATED OBJECTS
None.
INSTANCE VARIABLES
See EPrints::DataObj.
METHODS
Constructor Methods
new_from_request
$progress = EPrints::DataObj::UploadProgress->new_from_request( $session )
Creates and returns a new upload progress data object based on the current request.
Returns undef if no file upload is pointed to by this request.
Class Methods
get_system_field_info
$fields = EPrints::DataObj::UploadProgress->get_system_field_info
Returns an array describing the system metadata of the upload progress dataset.
get_dataset_id
$dataset = EPrints::DataObj::UploadProgress->get_dataset_id
Returns the id of the EPrints::DataSet object to which this record belongs.
remove_expired
$progress = EPrints::DataObj::UploadProgress->remove_expired( $session )
Remove all upload progress data objects where expired is earlier than the current time.
get_defaults
$defaults = EPrints::DataObj::UploadProgress->get_defaults( $session, $data )
Returns default values for this object based on the starting $data.
Sets expires to one week from now.
Object Methods
update_cb
$progress->update_cb( $filename, $buffer, $bytes_read, $progress )
Updates callback for use with CGI. Limits database writes to a minimum of 1 second between updates of the received field to the value provided by $bytes_read.
SEE ALSO
EPrints::DataObj and EPrints::DataSet.
COPYRIGHT
© Copyright 2000-2024 University of Southampton.
EPrints 3.4 is supplied by EPrints Services.
http://www.eprints.org/eprints-3.4/
LICENSE
This file is part of EPrints 3.4 http://www.eprints.org/.
EPrints 3.4 and this file are released under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation unless otherwise stated.
EPrints 3.4 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with EPrints 3.4. If not, see http://www.gnu.org/licenses/.