From 83514973553638c905511aec80ce0bcd82e61f6f Mon Sep 17 00:00:00 2001 From: trivernis Date: Thu, 23 Jan 2020 16:13:49 +0100 Subject: [PATCH] Fix aspect ratio of image changes when uploaded --- src/routes/UploadRoute.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/UploadRoute.ts b/src/routes/UploadRoute.ts index ff0911f..0354075 100644 --- a/src/routes/UploadRoute.ts +++ b/src/routes/UploadRoute.ts @@ -204,7 +204,7 @@ export class UploadRoute extends Route { const post = await Post.findByPk(postId); if (post.authorId === request.session.userId) { if (is.image(postMedia.mimetype)) { - fileName = await this.uploadManager.processAndStoreImage(postMedia.data, 1080, 720, "contain"); + fileName = await this.uploadManager.processAndStoreImage(postMedia.data, 1080, 720, "inside"); } else if (is.video(postMedia.mimetype)) { fileName = await this.uploadManager.processAndStoreVideo(postMedia.data, 1080); } else {