ブロック, フォロー, ミュート, リストのインポートファイルの制限を32MiBに

This commit is contained in:
tamaina 2023-04-22 19:06:51 +00:00
parent aa8be4a981
commit 3bd7be35d8
4 changed files with 4 additions and 4 deletions

View file

@ -65,7 +65,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
if (file == null) throw new ApiError(meta.errors.noSuchFile);
//if (!file.type.endsWith('/csv')) throw new ApiError(meta.errors.unexpectedFileType);
if (file.size > 50000) throw new ApiError(meta.errors.tooBigFile);
if (file.size > 32 * 1024 * 1024) throw new ApiError(meta.errors.tooBigFile);
if (file.size === 0) throw new ApiError(meta.errors.emptyFile);
this.queueService.createImportBlockingJob(me, file.id);

View file

@ -64,7 +64,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
if (file == null) throw new ApiError(meta.errors.noSuchFile);
//if (!file.type.endsWith('/csv')) throw new ApiError(meta.errors.unexpectedFileType);
if (file.size > 50000) throw new ApiError(meta.errors.tooBigFile);
if (file.size > 32 * 1024 * 1024) throw new ApiError(meta.errors.tooBigFile);
if (file.size === 0) throw new ApiError(meta.errors.emptyFile);
this.queueService.createImportFollowingJob(me, file.id);

View file

@ -65,7 +65,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
if (file == null) throw new ApiError(meta.errors.noSuchFile);
//if (!file.type.endsWith('/csv')) throw new ApiError(meta.errors.unexpectedFileType);
if (file.size > 50000) throw new ApiError(meta.errors.tooBigFile);
if (file.size > 32 * 1024 * 1024) throw new ApiError(meta.errors.tooBigFile);
if (file.size === 0) throw new ApiError(meta.errors.emptyFile);
this.queueService.createImportMutingJob(me, file.id);

View file

@ -64,7 +64,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
if (file == null) throw new ApiError(meta.errors.noSuchFile);
//if (!file.type.endsWith('/csv')) throw new ApiError(meta.errors.unexpectedFileType);
if (file.size > 30000) throw new ApiError(meta.errors.tooBigFile);
if (file.size > 32 * 1024 * 1024) throw new ApiError(meta.errors.tooBigFile);
if (file.size === 0) throw new ApiError(meta.errors.emptyFile);
this.queueService.createImportUserListsJob(me, file.id);