- Resource functions
-
- get_resource_field_data
- create_resource
- update_field
- 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
- get_related_resources
- replace_resource_file
- get_resource_all_image_sizes
- put_resource_data
- update_related_resource
- resource_log_last_rows
- Collection functions
- Search functions
- IIIF
- Metadata functions
create_resource
Create a new resource.
$resource_type * | The ID of the resource type for the new resource (e.g. 1=Photo). |
---|---|
$archive | The archival state of the new resource (0=live). |
$url | Optional The URL of a file to upload. ResourceSpace will copy the file to the local system then import it to the specified resource. |
$no_exif | Optional Do not process embedded metadata. Leave blank for the default (to process data). |
$revert | Not currently used, leave blank. |
$autorotate | Optional Automatically rotate (correct) images if the rotation flag is set on the image. |
$metadata | Optional The metadata to add. A JSON encoded array of field ID to value string pairs. See the example in api/example.php. |
Return values
The ID of the newly created resource.