|
|
|
@ -7,6 +7,7 @@ class Upload extends \Movim\Widget\Base { |
|
|
|
{ |
|
|
|
$this->addjs('upload.js'); |
|
|
|
$this->registerEvent('upload_request_handle', 'onRequested'); |
|
|
|
$this->registerEvent('upload_request_errornotacceptable', 'onErrorNotAcceptable'); |
|
|
|
header('Access-Control-Allow-Origin: *'); |
|
|
|
} |
|
|
|
|
|
|
|
@ -16,6 +17,11 @@ class Upload extends \Movim\Widget\Base { |
|
|
|
RPC::call('Upload.request', $get, $put); |
|
|
|
} |
|
|
|
|
|
|
|
function onErrorNotAcceptable() |
|
|
|
{ |
|
|
|
Notification::append(null, $this->__('upload.error_filesize')); |
|
|
|
} |
|
|
|
|
|
|
|
function ajaxRequest() |
|
|
|
{ |
|
|
|
$view = $this->tpl(); |
|
|
|
|