editor: fix load after resize

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
pull/579/head
Varun Patil 2023-04-16 10:52:54 -07:00
parent bc704e8221
commit bb047d9418
2 changed files with 11 additions and 2 deletions

View File

@ -344,6 +344,9 @@ class ImageController extends GenericApiController
$file->putContent($blob);
}
// Make sure the preview is updated
\OC::$server->get(\OCP\IPreview::class)->getPreview($file);
return new JSONResponse([
'fileid' => $file->getId(),
'etag' => $file->getEtag(),

View File

@ -176,7 +176,7 @@
<script lang="ts">
import { defineComponent } from "vue";
import { IDay, IPhoto, IRow, IRowType } from "../../types";
import { IDay, IImageInfo, IPhoto, IRow, IRowType } from "../../types";
import { PsSlide } from "./types";
import UserConfig from "../../mixins/UserConfig";
@ -800,8 +800,14 @@ export default defineComponent({
// Lazy load the rest of EXIF data
if (!photo.imageInfo) {
axios.get(API.IMAGE_INFO(photo.fileid)).then((res) => {
axios.get<IImageInfo>(API.IMAGE_INFO(photo.fileid)).then((res) => {
photo.imageInfo = res.data;
// Update params in photo object
photo.w = res.data.w;
photo.h = res.data.h;
photo.basename = res.data.basename;
photo.mimetype = res.data.mimetype;
});
}