mirror of
https://github.com/getgrav/grav.git
synced 2026-03-04 03:21:33 +01:00
FlexMediaTrait: Fix media meta file
This commit is contained in:
@@ -153,7 +153,7 @@ class FlexForm implements \Serializable
|
||||
return $object->route('/edit.json/task:media.upload');
|
||||
}
|
||||
|
||||
public function getFileDeleteAjaxRoute()
|
||||
public function getFileDeleteAjaxRoute($field, $filename)
|
||||
{
|
||||
$object = $this->getObject();
|
||||
if (!method_exists($object, 'route')) {
|
||||
|
||||
@@ -108,7 +108,7 @@ trait FlexMediaTrait
|
||||
if ($uploadedFile instanceof FormFlashFile) {
|
||||
$metadata = $uploadedFile->getMetaData();
|
||||
if ($metadata) {
|
||||
$file = YamlFile::instance($filepath . '.yaml');
|
||||
$file = YamlFile::instance($filepath . '.meta.yaml');
|
||||
$file->save(['upload' => $metadata]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user