mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-02 06:09:02 +02:00
MINOR Checking for success of file upload before trying to add metadata in AssetAdmin->doUpload() (AIR-37)
This commit is contained in:
parent
089973803b
commit
093eb6cd53
@ -225,8 +225,7 @@ JS
|
||||
|
||||
// move file to given folder
|
||||
if($valid) {
|
||||
$newFile = $folder->addUploadToFolder($tmpFile);
|
||||
|
||||
if($newFile = $folder->addUploadToFolder($tmpFile)) {
|
||||
if(self::$metadata_upload_enabled && isset($processedData[$filePostId])) {
|
||||
$fileObject = DataObject::get_by_id('File', $newFile);
|
||||
$metadataForm = new Form($this, 'MetadataForm', $fileObject->uploadMetadataFields(), new FieldSet());
|
||||
@ -239,6 +238,7 @@ JS
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($newFiles) {
|
||||
$numFiles = sizeof($newFiles);
|
||||
|
Loading…
Reference in New Issue
Block a user