From 3f53cbd8f680c5659c53bf709fdd044c5dcb59c7 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Fri, 10 Mar 2023 01:37:22 +0100 Subject: [PATCH] fix(backend/DriveService): convert WebP/AVIF to WebP (#10239) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(backend/DriveService): convert transparent WebP/AVIF to PNG * webpにする その希望が複数ありましたので * Update packages/backend/src/core/DriveService.ts Co-authored-by: Acid Chicken (硫酸鶏) * update test * webpはwebpublicにできる --------- Co-authored-by: Acid Chicken (硫酸鶏) Co-authored-by: tamaina --- packages/backend/src/core/DriveService.ts | 12 ++-- .../src/core/activitypub/ApRendererService.ts | 68 +++++++++--------- packages/backend/test/e2e/endpoints.ts | 41 ++++++++++- .../backend/test/resources/with-alpha.avif | Bin 0 -> 10032 bytes .../backend/test/resources/with-alpha.webp | Bin 0 -> 4984 bytes .../backend/test/resources/without-alpha.avif | Bin 0 -> 3982 bytes .../backend/test/resources/without-alpha.webp | Bin 0 -> 4474 bytes packages/backend/test/utils.ts | 7 +- 8 files changed, 86 insertions(+), 42 deletions(-) create mode 100644 packages/backend/test/resources/with-alpha.avif create mode 100644 packages/backend/test/resources/with-alpha.webp create mode 100644 packages/backend/test/resources/without-alpha.avif create mode 100644 packages/backend/test/resources/without-alpha.webp diff --git a/packages/backend/src/core/DriveService.ts b/packages/backend/src/core/DriveService.ts index f4a06faebb..c3835faa33 100644 --- a/packages/backend/src/core/DriveService.ts +++ b/packages/backend/src/core/DriveService.ts @@ -299,7 +299,7 @@ export class DriveService { } satisfyWebpublic = !!( - type !== 'image/svg+xml' && type !== 'image/webp' && type !== 'image/avif' && + type !== 'image/svg+xml' && type !== 'image/avif' && !(metadata.exif ?? metadata.iptc ?? metadata.xmp ?? metadata.tifftagPhotoshop) && metadata.width && metadata.width <= 2048 && metadata.height && metadata.height <= 2048 @@ -319,11 +319,11 @@ export class DriveService { this.registerLogger.info('creating web image'); try { - if (['image/jpeg', 'image/webp', 'image/avif'].includes(type)) { + if (type === 'image/jpeg') { webpublic = await this.imageProcessingService.convertSharpToJpeg(img, 2048, 2048); - } else if (['image/png'].includes(type)) { - webpublic = await this.imageProcessingService.convertSharpToPng(img, 2048, 2048); - } else if (['image/svg+xml'].includes(type)) { + } else if (['image/webp', 'image/avif'].includes(type)) { + webpublic = await this.imageProcessingService.convertSharpToWebp(img, 2048, 2048); + } else if (['image/png', 'image/svg+xml'].includes(type)) { webpublic = await this.imageProcessingService.convertSharpToPng(img, 2048, 2048); } else { this.registerLogger.debug('web image not created (not an required image)'); @@ -749,7 +749,7 @@ export class DriveService { }: UploadFromUrlArgs): Promise { // Create temp file const [path, cleanup] = await createTemp(); - + try { // write content at URL to temp file const { filename: name } = await this.downloadService.downloadUrl(url, path); diff --git a/packages/backend/src/core/activitypub/ApRendererService.ts b/packages/backend/src/core/activitypub/ApRendererService.ts index 6a1f233bd8..4601eca2f0 100644 --- a/packages/backend/src/core/activitypub/ApRendererService.ts +++ b/packages/backend/src/core/activitypub/ApRendererService.ts @@ -116,7 +116,7 @@ export class ApRendererService { if (block.blockee?.uri == null) { throw new Error('renderBlock: missing blockee uri'); } - + return { type: 'Block', id: `${this.config.url}/blocks/${block.id}`, @@ -134,10 +134,10 @@ export class ApRendererService { published: note.createdAt.toISOString(), object, } as ICreate; - + if (object.to) activity.to = object.to; if (object.cc) activity.cc = object.cc; - + return activity; } @@ -155,7 +155,7 @@ export class ApRendererService { public renderDocument(file: DriveFile): IApDocument { return { type: 'Document', - mediaType: file.type, + mediaType: file.webpublicType ?? file.type, url: this.driveFileEntityService.getPublicUrl(file), name: file.comment, }; @@ -297,16 +297,16 @@ export class ApRendererService { const items = await this.driveFilesRepository.findBy({ id: In(ids) }); return ids.map(id => items.find(item => item.id === id)).filter(item => item != null) as DriveFile[]; }; - + let inReplyTo; let inReplyToNote: Note | null; - + if (note.replyId) { inReplyToNote = await this.notesRepository.findOneBy({ id: note.replyId }); - + if (inReplyToNote != null) { const inReplyToUser = await this.usersRepository.findOneBy({ id: inReplyToNote.userId }); - + if (inReplyToUser != null) { if (inReplyToNote.uri) { inReplyTo = inReplyToNote.uri; @@ -322,24 +322,24 @@ export class ApRendererService { } else { inReplyTo = null; } - + let quote; - + if (note.renoteId) { const renote = await this.notesRepository.findOneBy({ id: note.renoteId }); - + if (renote) { quote = renote.uri ? renote.uri : `${this.config.url}/notes/${renote.id}`; } } - + const attributedTo = `${this.config.url}/users/${note.userId}`; - + const mentions = (JSON.parse(note.mentionedRemoteUsers) as IMentionedRemoteUsers).map(x => x.uri); - + let to: string[] = []; let cc: string[] = []; - + if (note.visibility === 'public') { to = ['https://www.w3.org/ns/activitystreams#Public']; cc = [`${attributedTo}/followers`].concat(mentions); @@ -352,44 +352,44 @@ export class ApRendererService { } else { to = mentions; } - + const mentionedUsers = note.mentions.length > 0 ? await this.usersRepository.findBy({ id: In(note.mentions), }) : []; - + const hashtagTags = (note.tags ?? []).map(tag => this.renderHashtag(tag)); const mentionTags = mentionedUsers.map(u => this.renderMention(u)); - + const files = await getPromisedFiles(note.fileIds); - + const text = note.text ?? ''; let poll: Poll | null = null; - + if (note.hasPoll) { poll = await this.pollsRepository.findOneBy({ noteId: note.id }); } - + let apText = text; - + if (quote) { apText += `\n\nRE: ${quote}`; } - + const summary = note.cw === '' ? String.fromCharCode(0x200B) : note.cw; - + const content = this.apMfmService.getNoteHtml(Object.assign({}, note, { text: apText, })); - + const emojis = await this.getEmojis(note.emojis); const apemojis = emojis.map(emoji => this.renderEmoji(emoji)); - + const tag = [ ...hashtagTags, ...mentionTags, ...apemojis, ]; - + const asPoll = poll ? { type: 'Question', content: this.apMfmService.getNoteHtml(Object.assign({}, note, { @@ -601,7 +601,7 @@ export class ApRendererService { if (typeof x === 'object' && x.id == null) { x.id = `${this.config.url}/${uuid()}`; } - + return Object.assign({ '@context': [ 'https://www.w3.org/ns/activitystreams', @@ -634,18 +634,18 @@ export class ApRendererService { ], }, x as T & { id: string; }); } - + @bindThis public async attachLdSignature(activity: any, user: { id: User['id']; host: null; }): Promise { const keypair = await this.userKeypairStoreService.getUserKeypair(user.id); - + const ldSignature = this.ldSignatureService.use(); ldSignature.debug = false; activity = await ldSignature.signRsaSignature2017(activity, keypair.privateKey, `${this.config.url}/users/${user.id}#main-key`); - + return activity; } - + /** * Render OrderedCollectionPage * @param id URL of self @@ -686,11 +686,11 @@ export class ApRendererService { type: 'OrderedCollection', totalItems, }; - + if (first) page.first = first; if (last) page.last = last; if (orderedItems) page.orderedItems = orderedItems; - + return page; } diff --git a/packages/backend/test/e2e/endpoints.ts b/packages/backend/test/e2e/endpoints.ts index c130093732..653520cf5f 100644 --- a/packages/backend/test/e2e/endpoints.ts +++ b/packages/backend/test/e2e/endpoints.ts @@ -4,7 +4,7 @@ import * as assert from 'assert'; // node-fetch only supports it's own Blob yet // https://github.com/node-fetch/node-fetch/pull/1664 import { Blob } from 'node-fetch'; -import { startServer, signup, post, api, uploadFile } from '../utils.js'; +import { startServer, signup, post, api, uploadFile, simpleGet } from '../utils.js'; import type { INestApplicationContext } from '@nestjs/common'; describe('Endpoints', () => { @@ -439,6 +439,45 @@ describe('Endpoints', () => { assert.strictEqual(res.body.name, 'image.svg'); assert.strictEqual(res.body.type, 'image/svg+xml'); }); + + for (const type of ['webp', 'avif']) { + const mediaType = `image/${type}`; + + const getWebpublicType = async (user: any, fileId: string): Promise => { + // drive/files/create does not expose webpublicType directly, so get it by posting it + const res = await post(user, { + text: mediaType, + fileIds: [fileId], + }); + const apRes = await simpleGet(`notes/${res.id}`, 'application/activity+json'); + assert.strictEqual(apRes.status, 200); + assert.ok(Array.isArray(apRes.body.attachment)); + return apRes.body.attachment[0].mediaType; + }; + + test(`透明な${type}ファイルを作成できる`, async () => { + const path = `with-alpha.${type}`; + const res = await uploadFile(alice, { path }); + + assert.strictEqual(res.status, 200); + assert.strictEqual(res.body.name, path); + assert.strictEqual(res.body.type, mediaType); + + const webpublicType = await getWebpublicType(alice, res.body.id); + assert.strictEqual(webpublicType, 'image/webp'); + }); + + test(`透明じゃない${type}ファイルを作成できる`, async () => { + const path = `without-alpha.${type}`; + const res = await uploadFile(alice, { path }); + assert.strictEqual(res.status, 200); + assert.strictEqual(res.body.name, path); + assert.strictEqual(res.body.type, mediaType); + + const webpublicType = await getWebpublicType(alice, res.body.id); + assert.strictEqual(webpublicType, 'image/webp'); + }); + } }); describe('drive/files/update', () => { diff --git a/packages/backend/test/resources/with-alpha.avif b/packages/backend/test/resources/with-alpha.avif new file mode 100644 index 0000000000000000000000000000000000000000..05f494212eff008216ce34d939b545aeaf288e88 GIT binary patch literal 10032 zcmYjWV{~RqvwmYvY`?LsNhY>!JDJ$F&53Q>)2YKRF`L{FxfMDS4X7$ku$Un^?7#TYn{nO}Ys|yx(4t5{5%EHdb_QRrC zINF(f*bn)nKNWyvXW;l5^Ir$NfeVw6KR@)poQ0dkCjf(n{&f7y0q{OuAIJ1B2lB~q zesm%9>2`Lo;j*?fG5co_cej zKGy#N0P*{%KxAQOZSYy@Lq4_z0RkEr6b1nOu)!gr000@kwXwlJcPAl14ftFe5`Y5o zzgGjm0fG2uFRC95?tifE2d4Z_%;z02fq(*#KJ4ciT7-iC6YuhYKSlpTKhNU7*3Q7f z#);m>#EFQFo{^pz0098RK>@%&A{d!j7(sIXZ)MQje=B{agZ)1Y@gLm!k@G2^cLn-S z1;wwNALu{Tm>3y9Srh;)Bo_Yr`-(F2I^9Q;jmqFv?xKEl{V-W_w?psm1H$5vhG$iX zI#aGw*%~K{&72}d`_>8FJyzEKgVqUkf&NlON#;k>Nu73VeiRMT%C2o>_s1Kw>4Jps zaSVwzTkG~k$kwK_aeE3|K=}2NWL0|$8+)p34GYD=eY2b`T)KIh+$Q?Yz6QGB(is~f zM;v%vwb<(6mt*5c<8SfODugE>Hm?-#1wIm-nvt0@m|)z8mxv zshFJtf1SeiGX})mVhbsl`vsq7qmnI&d-T|_UC?%-S~;_ls!|hZu7z{*@}56uWBpFj zx<2!t)o|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=B9JR?2)YJKPS6_JfpbVSP**ZYmc{7FJbg|y%#q+r z>UVt?*>W3CiY%#%X|&X@ffyjTxmj)8t{}`_~5^ZlI%FU;Bx30ey_vh>DgZ zt;gMP$nRU%PQue33nHk`7WN^TUYQ1`-3ttG!rU?=u=;-{s;N!bs@UP2psM^K{Hii- z+>XYttE4~IQe_HFqf?^j#u&n%I_7dYw1`k_UV(!ttPWZ4$ty#{t4yF(AQK^{@HO96 z(HXsaa}q&>QmWW#97uj8EDxmz`^!n2tE}!=4wzp6;n(Nn*PS7jdJ^xi=gq4$95(7h ze0BWIKo}1nYLr!FPiyI9(t}`e+9AlY=wNH=0KY7kl3mZ=NAStpf6949+CC`&f(p1Y zlwK;as%PcIelkSFrR6H#3GiA&1CLlli1H93e!2GPP9f!Pviot!A*g1UyXi)XFk9`> zNJcKOuaG)#mt8Ljy_Ls87a-H?oV~bqwNJo*eB5&B$(;yAL)V7`u4g4nvgXvPmha?B z-J~SVy8Z2o2fvm|l=wtj*!c4h{=_6NF2~EQe*at{P`ya7qLO9(DRENcwp5B?o ifI9ncFi#N8NstDBXEQ1RfS-pBr&Q6N3JL0um;V7J-F2$~ literal 0 HcmV?d00001 diff --git a/packages/backend/test/resources/with-alpha.webp b/packages/backend/test/resources/with-alpha.webp new file mode 100644 index 0000000000000000000000000000000000000000..d7b0d70b7fdbbd9ef4be7e2d680aeee7b7821d5a GIT binary patch literal 4984 zcmYkAbyO5w^T&4=mTm!oC6-1yrIrvx36X9kq`M_nSXerQMY>nIM3EK{1QbL>IwU2e zq?d->7oYd}o%c6q=FI1wJ2Us*|GwwyYdm=1bqfG6QB%=1)|D|O0RR9DH-Y=d?>*90 z=O6+Afcr7m&CbnO+{>3GZFh=)%2l|}Hr@D6@y{mrHhHPk>X&u79j8nPNyj%*eOYbW z?OCx|0Cfza2#1S#U22_>@=e-pu|DW{?&E|wyvUGS?y=cH--&{SiOwHg{yS_In@I*H zp0oAW$)&1HcExF~y_I~1xFFlUhJs#W_@@vs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)uZaN(sheaOXI;O>m>KFIaFMIUU8V z({n^Ovt$M((pq3nJCj39GOE!v#_-{mVaG&iqrL WO9AMwgQ0@_CHvP+QbOXN+y4NnZExrR literal 0 HcmV?d00001 diff --git a/packages/backend/test/utils.ts b/packages/backend/test/utils.ts index 37e5ae10d6..d1a5d6d949 100644 --- a/packages/backend/test/utils.ts +++ b/packages/backend/test/utils.ts @@ -204,7 +204,12 @@ export const simpleGet = async (path: string, accept = '*/*'): Promise<{ status: redirect: 'manual', }); - const body = res.headers.get('content-type') === 'application/json; charset=utf-8' + const jsonTypes = [ + 'application/json; charset=utf-8', + 'application/activity+json; charset=utf-8', + ]; + + const body = jsonTypes.includes(res.headers.get('content-type') ?? '') ? await res.json() : null;