mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FEATURE set file metadata on upload. (from r97780) (from r99106)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102849 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c3e001f82c
commit
195e341c88
@ -653,6 +653,20 @@ class File extends DataObject {
|
|||||||
return new ValidationResult(true);
|
return new ValidationResult(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allow custom fields for uploads in {@link AssetAdmin}.
|
||||||
|
* Similar to {@link getCMSFields()}, but a more restricted
|
||||||
|
* set of fields which can be reliably set on any file type.
|
||||||
|
*
|
||||||
|
* @return FieldSet
|
||||||
|
*/
|
||||||
|
function uploadMetadataFields() {
|
||||||
|
$fields = new FieldSet();
|
||||||
|
$fields->push(new TextField('Title'));
|
||||||
|
$this->extend('updateUploadMetadataFields', $fields);
|
||||||
|
return $fields;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user