Class FilesApiController
| package |
OCA\Gallery\Controller |
|---|
__construct(string $appName, \OCP\IRequest $request, \OCP\IURLGenerator $urlGenerator, \OCA\Gallery\Service\SearchFolderService $searchFolderService, \OCA\Gallery\Service\ConfigService $configService, \OCA\Gallery\Service\SearchMediaService $searchMediaService, \OCA\Gallery\Service\DownloadService $downloadService, \OCP\ILogger $logger)
string
\OCP\IRequest
\OCP\IURLGenerator
\OCA\Gallery\Service\SearchFolderService
\OCA\Gallery\Service\ConfigService
\OCA\Gallery\Service\SearchMediaService
\OCA\Gallery\Service\DownloadService
\OCP\ILogger
download(integer $fileId, string|null $filename = null) : \OCA\Gallery\Http\ImageResponse
| NoAdminRequired | |
|---|---|
| NoCSRFRequired | |
| CORS |
Sends the file matching the fileId In case of error we send an HTML error page We need to keep the session open in order to be able to send the error message to the error page |
integerthe ID of the file we want to download
string|null
\OCA\Gallery\Http\ImageResponse
fixPaths(array $files, string $folderPathFromRoot) : array
We only want to keep one folder between the current folder and the found media file /root/folder/sub1/sub2/file.ext becomes /root/folder/file.ext
array
string
array
getDownload(integer $fileId, string|null $filename) : array|false
integerthe ID of the file of which we need a large preview of
string|null
array|false
getFilesAndAlbums(string $location, array $features, string $etag, array $mediatypes) : array
| NoAdminRequired |
Returns a list of all media files and albums available to the authenticated user
|
|---|
stringa path representing the current album in the app
arraythe list of supported features
stringthe last known etag in the client
arraythe list of supported media types
array<string,array<string,string|int>>|Http\JSONResponse
getHttpStatusCode( $exception) : \OCA\Gallery\Controller\array<null|integer|\OCA\Gallery\Controller\string>
\OCA\Gallery\Controller\array
getList(string $location, string $features, string $etag, string $mediatypes) : array
| NoAdminRequired | |
|---|---|
| NoCSRFRequired | |
| CORS |
Returns a list of all media files available to the authenticated user |
| see | \OCA\Gallery\Controller\FilesController::getList() |
stringa path representing the current album in the app
stringthe list of supported features
stringthe last known etag in the client
stringthe list of supported media types
array<string,array<string,string|int>>|Http\JSONResponse
htmlError(\OCP\IURLGenerator $urlGenerator, string $appName, \Exception $exception) : \OCP\AppFramework\Http\RedirectResponse
\OCP\IURLGenerator
string
\Exception
\OCP\AppFramework\Http\RedirectResponse
jsonError(\Exception $exception) : \OCP\AppFramework\Http\JSONResponse
\Exception
\OCP\AppFramework\Http\JSONResponse
urlGenerator : \OCP\IURLGenerator
| var |
|---|
\OCP\IURLGenerator
searchFolderService : \OCA\Gallery\Service\SearchFolderService
configService : \OCA\Gallery\Service\ConfigService
searchMediaService : \OCA\Gallery\Service\SearchMediaService
downloadService : \OCA\Gallery\Service\DownloadService
logger : \OCP\ILogger
| var |
|---|
\OCP\ILogger