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
replace_resource_file
Replaces the primary resource file for a given resource
Variable | Description | Data type | Default |
---|---|---|---|
$resource * | The ID of the resource to replace the file for. | integer | |
$file_location * | The file path or URL of the file to use as the replacement. This location must be accessible without authentication from the server. | string | |
$no_exif | Do not process embedded metadata. Leave blank for the default (to process data). | bit (0 or 1) | 0 |
$autorotate | Automatically rotate (correct) images if the rotation flag is set on the image. | bit (0 or 1) | 0 |
$keep_original | Preserve the original resource file? If using the rse_version plugin then this must be set to true unless it is explicitly permitted to be disabled in the plugin configuration. If this plugin is not in use then setting this to true will save the original resource file as an alternative file. | bit (0 or 1) | 1 |
Return values
a JSON encoded array including 'Status' (SUCCESS/FAILED) indicating whether the replacement was successfult and 'Message' providing further information on the result.