Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-08-20 01:22:33 +0300
committerOlivier Paroz <github@oparoz.com>2015-08-20 01:22:33 +0300
commitfb5d902e115c5a4b313a1fc468b5a3dbacf7c739 (patch)
tree73aca712f0ad1aca903359fe335077fbbddf62cd /controller
parent79b85c933c8eb2dadda746508ce39d3cc5580a36 (diff)
Test for preview of broken file
Diffstat (limited to 'controller')
-rw-r--r--controller/previewapicontroller.php7
-rw-r--r--controller/previewcontroller.php7
2 files changed, 12 insertions, 2 deletions
diff --git a/controller/previewapicontroller.php b/controller/previewapicontroller.php
index dfa2b5b3..0616b6ef 100644
--- a/controller/previewapicontroller.php
+++ b/controller/previewapicontroller.php
@@ -123,7 +123,12 @@ class PreviewApiController extends ApiController {
list($file, $preview, $status) = $this->getData($fileId, $width, $height);
if (!$preview) {
- return new JSONResponse(['message' => 'Oh Nooooes!', 'success' => false], $status);
+ return new JSONResponse(
+ [
+ 'message' => "I'm truly sorry, but we were unable to generate a preview for this file",
+ 'success' => false
+ ], $status
+ );
}
$preview['name'] = $file->getName();
diff --git a/controller/previewcontroller.php b/controller/previewcontroller.php
index 2bc695e6..c600a9bf 100644
--- a/controller/previewcontroller.php
+++ b/controller/previewcontroller.php
@@ -126,7 +126,12 @@ class PreviewController extends Controller {
list($file, $preview, $status) = $this->getData($fileId, $width, $height);
if (!$preview) {
- return new JSONResponse(['message' => 'Oh Nooooes!', 'success' => false], $status);
+ return new JSONResponse(
+ [
+ 'message' => "I'm truly sorry, but we were unable to generate a preview for this file",
+ 'success' => false
+ ], $status
+ );
}
$preview['name'] = $file->getName();