insert_files_for_item — Add files to an item.¶
- insert_files_for_item($item, $transferStrategy, $files, $options = array())¶
Add files to an item.
- $item (Item|integer) – Item record or ID of item to add files to
- $transferStrategy (string|Omeka_File_Ingest_AbstractIngest) – Strategy to use when ingesting the file. The strings ‘Url’, ‘Filesystem’ and ‘Upload’ correspond to those built-in strategies. Alternatively a strategy object can be passed.
- $files (array) – Information about the file(s) to ingest. See addFiles() for details
- $options (array) – Array of options to modify the behavior of the ingest. Available options include: - ‘ignore_invalid_files’: boolean, false by default. Whether or not to throw exceptions when a file is not valid. - ‘ignoreNoFile’: (for Upload only) boolean, false by default. Whether to ignore validation errors that occur when an uploaded file is missing, like when a file input is left empty on a form.
array The added File records.