Hi,
i’d like to redirect to the image file after the file has been uploaded in the panel. As our authors has to provide many additional information per uplooaded image i’d like somewhat “force” them to fill out all fields proovided by the special file template.
My current attempt leads to an error (The file could not be uploaded):
I used the following hook:
'hooks' => [
'file.create:after' => function ($file) {
try {
$created = date('Y-m-d H:i:s');
$file->update(
[
'created' => $created,
]
);
go('files/'.$file->name());
//return true;
} catch (Exception $e) {
return $e->getMessage();
}
}
]
Any idea what i missed here?
Thanks in advance,
Thomas E.-E.