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
Collection functions
Search functions
IIIF
Metadata functions
User functions
System
Message functions
Plugin functions
add_alternative_file
Adds a new alternative file.
Variable | Description | Data type | Default |
---|---|---|---|
$resource * | The ID of the resource. | integer | |
$name * | A short descriptive name for the new alternative file. | string | |
$description | A more verbose description. | string | "" |
$file_name | The file name of the new alternative file. | string | "" |
$file_extension | The extension of the new alternative file. | string | "" |
$file_size | The size of the alternative file in bytes | integer | 0 |
$alt_type | Used as a tag that in conjunction with configuration $alt_types_organize will group and organize the display of alternative files | string | "" |
$file | Optional Alternative file location to copy over to ResourceSpace. Can be a physical path or URL. If using a physical path, system config. $valid_upload_paths may need to be updated to specify the new path. $api_upload_urls may need updating if using a URL. |
string | "" |
Return values
The ID of the new alternative file or false on failure.