Fixed file uploads to media streams

This commit is contained in:
Matias Griese
2018-05-22 10:58:35 +03:00
parent ee8e4886ad
commit 08075979c1
3 changed files with 11 additions and 4 deletions

View File

@@ -261,7 +261,7 @@ class AdminBaseController
}
// Handle errors and breaks without proceeding further
if ($upload->file->error != UPLOAD_ERR_OK) {
if ($upload->file->error !== UPLOAD_ERR_OK) {
$this->admin->json_response = [
'status' => 'error',
'message' => sprintf($this->admin->translate('PLUGIN_ADMIN.FILEUPLOAD_UNABLE_TO_UPLOAD', null),
@@ -780,7 +780,7 @@ class AdminBaseController
$folder = Folder::getRelativePath(rtrim($folder, '/'));
$folder = $this->admin->getPagePathFromToken($folder);
$media = new Media($folder);
$media = new Media($folder);
}
$available_files = [];