mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-30 03:43:40 +01:00
show upload error for TinyMCE images by pushing it as error-message to client and also show it instead of the URL
This commit is contained in:
parent
bad6a86f39
commit
5327c6e770
@ -205,7 +205,13 @@ class Vfs extends File
|
|||||||
|
|
||||||
if ($type == 'htmlarea')
|
if ($type == 'htmlarea')
|
||||||
{
|
{
|
||||||
$result = array ('location' => Api\Framework::link(Api\Vfs::download_url($path)));
|
// try to show error to user by push and instead of the (anyway not working) URL
|
||||||
|
if (isset($error))
|
||||||
|
{
|
||||||
|
$push = new Json\Push();
|
||||||
|
$push->message($error, 'error');
|
||||||
|
}
|
||||||
|
$result = array ('location' => $error ?? Api\Framework::link(Api\Vfs::download_url($path)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user