Class PreviewController
package |
OCA\Gallery\Controller |
---|
__construct(string $appName, \OCP\IRequest $request, \OCP\IURLGenerator $urlGenerator, \OCA\Gallery\Service\ConfigService $configService, \OCA\Gallery\Service\ThumbnailService $thumbnailService, \OCA\Gallery\Service\PreviewService $previewService, \OCA\Gallery\Service\DownloadService $downloadService, \OCA\Gallery\Utility\EventSource $eventSource, \OCP\ILogger $logger)
string
\OCP\IRequest
\OCP\IURLGenerator
\OCA\Gallery\Service\ConfigService
\OCA\Gallery\Service\ThumbnailService
\OCA\Gallery\Service\PreviewService
\OCA\Gallery\Service\DownloadService
\OCA\Gallery\Utility\EventSource
\OCP\ILogger
exitController()
getData(integer $fileId, integer $width, integer $height, boolean $keepAspect = true, boolean $animatedPreview = true, boolean $base64Encode = false) : \OCA\Gallery\Controller\array<string,\OC_Image|\OCA\Gallery\Controller\string>
Throws |
|
---|
integer
integer
integer
boolean
boolean
boolean
\OCA\Gallery\Controller\array
getErrorData( $status = \OCP\AppFramework\Http::STATUS_INTERNAL_SERVER_ERROR) : \OCA\Gallery\Controller\array<null|\OCA\Gallery\Controller\int>
\OCA\Gallery\Controller\array
getExceptionData(\OCA\Gallery\Service\ServiceException $exception) : \OCA\Gallery\Controller\array<null|integer|\OCA\Gallery\Controller\string>
getFile(integer $fileId) : \OCA\Gallery\Controller\array<File|integer|\OCA\Gallery\Controller\null>
integer
\OCA\Gallery\Controller\array
getPreview(integer $fileId, integer $width, integer $height) : \OCA\Gallery\Http\ImageResponse|\OCP\AppFramework\Http\JSONResponse
NoAdminRequired |
Sends either a large preview of the requested file or the original file itself |
---|
integer
the ID of the file of which we need a large preview of
integer
integer
\OCA\Gallery\Http\ImageResponse|\OCP\AppFramework\Http\JSONResponse
getPreviewData(\OCP\Files\File $file, boolean $animatedPreview, integer $width, integer $height, boolean $keepAspect, boolean $base64Encode) : array
\OCP\Files\File
boolean
integer
integer
boolean
boolean
array
getThumbnail(integer $fileId, boolean $square, double $scale) : \OCA\Gallery\Controller\array<string,array|\OCA\Gallery\Controller\string>
The thumbnail is either a resized preview of the file or the original file Thumbnails are base64encoded before getting sent back
integer
the ID of the file of which we need a thumbnail preview of
boolean
whether the thumbnail should be square
double
whether we're allowed to scale the preview up
\OCA\Gallery\Controller\array
getThumbnails(string $ids, boolean $square, double $scale) : \OCA\Gallery\Controller\array<string,array|string|\OCA\Gallery\Controller\null>
NoAdminRequired |
Generates thumbnails Uses EventSource to send thumbnails back as soon as they're created FIXME: @LukasReschke says: The exit is required here because otherwise the AppFramework is trying to add headers as well after dispatching the request which results in a "Cannot modify header information" notice. WARNING: Returning a JSON response does not get rid of the problem |
---|
string
the ID of the files of which we need thumbnail previews of
boolean
double
\OCA\Gallery\Controller\array
prepareEmptyThumbnail(\OCP\Files\File $file, integer $status) : \OCA\Gallery\Controller\array<string,null|\OCA\Gallery\Controller\string>
When we can't even get the file information, we send an empty mimeType
\OCP\Files\File
integer
\OCA\Gallery\Controller\array
eventSource : \OCA\Gallery\Utility\EventSource
urlGenerator : \OCP\IURLGenerator
var |
---|
\OCP\IURLGenerator
configService : \OCA\Gallery\Service\ConfigService
thumbnailService : \OCA\Gallery\Service\ThumbnailService
previewService : \OCA\Gallery\Service\PreviewService
downloadService : \OCA\Gallery\Service\DownloadService
logger : \OCP\ILogger
var |
---|
\OCP\ILogger
download :
type |
bool |
---|---|