We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b553b74 commit 52cbe93Copy full SHA for 52cbe93
app/support/media-files/process.ts
@@ -53,12 +53,13 @@ export async function processMediaFile(
53
54
// Check the file size, if it is too big, throw an error
55
{
56
+ const type = info.type === 'video' && info.isAnimatedImage ? 'image' : info.type;
57
const limits = currentConfig().attachments.fileSizeLimitByType;
- const sizeLimit = limits[info.type] ?? limits['default'];
58
+ const sizeLimit = limits[type] ?? limits['default'];
59
60
if (commonResult.fileSize > sizeLimit) {
61
throw new ContentTooLargeException(
- `This '${info.type}' file is too large (the maximum size is ${sizeLimit} bytes)`,
62
+ `This '${type}' file is too large (the maximum size is ${sizeLimit} bytes)`,
63
);
64
}
65
0 commit comments