Fix #436: Saving emojis per batch, to avoid hitting max payload limit.

This commit is contained in:
John Livingston
2024-06-20 11:14:00 +02:00
parent 01b93c1887
commit 83dd3130a1
5 changed files with 74 additions and 7 deletions

View File

@ -2,6 +2,9 @@
//
// SPDX-License-Identifier: AGPL-3.0-only
// Note: API request body size is limited to 100Kb (expressjs body-parser defaut limit, and Peertube nginx config).
// So we must be sure to never send more than 100Kb. The front end sends new emojis by batch, but maxSize must remain
// as little as possible, so that we never reach 100Kb in JSON/base64 format.
export const maxSize: number = 30 * 1024
export const allowedExtensions = ['png', 'jpg', 'jpeg', 'gif']
export const inputFileAccept = ['image/jpg', 'image/png', 'image/gif']