From 7d8bb60bfe3b310b3c9909128a441a8336b638c8 Mon Sep 17 00:00:00 2001 From: skjnldsv Date: Fri, 10 Jan 2025 11:56:17 +0100 Subject: feat(files): add conversion action Signed-off-by: skjnldsv --- apps/files/lib/Controller/ConversionApiController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apps/files/lib/Controller/ConversionApiController.php') diff --git a/apps/files/lib/Controller/ConversionApiController.php b/apps/files/lib/Controller/ConversionApiController.php index afdc4407349..40a42d6ca4c 100644 --- a/apps/files/lib/Controller/ConversionApiController.php +++ b/apps/files/lib/Controller/ConversionApiController.php @@ -48,7 +48,7 @@ class ConversionApiController extends OCSController { * @param string $targetMimeType The MIME type to which you want to convert the file * @param string|null $destination The target path of the converted file. Written to a temporary file if left empty * - * @return DataResponse + * @return DataResponse * * 201: File was converted and written to the destination or temporary file * @@ -98,8 +98,12 @@ class ConversionApiController extends OCSController { throw new OCSNotFoundException($this->l10n->t('Could not get relative path to converted file')); } + $file = $userFolder->get($convertedFileRelativePath); + $fileId = $file->getId(); + return new DataResponse([ 'path' => $convertedFileRelativePath, + 'fileId' => $fileId, ], Http::STATUS_CREATED); } } -- cgit v1.2.3