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.