Bug #85334
closedExt. filemetadata: missing workflow for field status
0%
Description
Is there a documentation for using the status field?
How to use this?
See attached screen.
Another question concerning filemetadata:
If i need a special field in filemetadata mandatory, how to realize this?
If i define this in tca like:
$GLOBALS['TCA']['sys_file_metadata']['columns']['copyright']['config']['eval'] = 'required';
the user can upload a file and reference it without filling out the mandatory field.
Only if he opens or edits file meta data, the mandatory validation or message works.
Files
Updated by Frans Saris over 6 years ago
The status field is only a meta field that you can give your own meaning. It doesn't has any workflow or whatever connected.
It's (currently) not possible to set a field required before a file can be used. You can only set the require for the fields when the form is opened like you mentioned.
But this would be a great feature to have. Having the file picker only show files where all required metadata is filled. And some mark in the file list to easily find the files that have some metadata missing.
Updated by Susanne Moog about 6 years ago
- Target version changed from 8.7.19 to Candidate for patchlevel
Updated by Garvin Hicking 5 months ago
- Status changed from New to Resolved
It's been some time ;)
I've now created a PR for the docs https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-CoreApi/pull/4524
The "status" field actually can also be used to indicate fetching metadata updates would be required, and can be put to custom workflows.
About required fields - the TYPO3 core uses a metadata reference as optional when being created. All metadata should be treated as "optional" also because other extensions may populate it automatically.
If you really want to enforce specific attributes on file uploads I would recommend to enhance the 'sys_file' database table with your own fields and TCA to mark the data in there as required fields. You might also be able to use new PSR-event hooks to react on missing data and revealing it with custom validation.
I will close this issue for now, if you feel this is a mistake or have additional feedback, please get in touch. You can also create a follow-up issue.