Resource functions
- get_resource_field_data
- create_resource
- delete_resource
- copy_resource
- get_resource_log
- update_resource_type
- get_resource_path
- get_resource_data
- get_alternative_files
- get_resource_types
- add_alternative_file
- delete_alternative_file
- upload_file
- upload_file_by_url
- upload_multipart
- get_related_resources
- resource_log_last_rows
- replace_resource_file
- get_resource_all_image_sizes
- put_resource_data
- update_related_resource
- relate_all_resources
- get_edit_access
- get_resource_access
Collection functions
Search functions
IIIF
Metadata functions
User functions
System
Message functions
Plugin functions
upload_file
Uploads a new local file to an existing resource, replacing any file that is already attached.
Variable | Description | Data type | Default |
---|---|---|---|
$ref * | The ID of the resource. | integer | |
$no_exif | Do not process embedded metadata. Leave blank for the default (to process data). | bit (0 or 1) | 0 |
$revert | Do not upload a new file, but re-process the existing file as if it has been uploaded again. Useful for re-processing embedded metadata, e.g. after changing the field mappings. | bit (0 or 1) | 0 |
$autorotate | Automatically rotate (correct) images if the rotation flag is set on the image. | bit (0 or 1) | 0 |
$file_path | The path on disc, local to the server, of the file to upload. System config. $valid_upload_paths may need to be updated if using a custom upload path. | string | "" |
Return values
The operation success (true/false).