mirror of
https://github.com/outline/outline.git
synced 2025-04-18 06:09:35 +00:00
fix: Include maximum import size
This commit is contained in:
@ -30,7 +30,12 @@ router.post(
|
||||
rateLimiter(RateLimiterStrategy.TenPerMinute),
|
||||
auth(),
|
||||
validate(T.FilesCreateSchema),
|
||||
multipart({ maximumFileSize: env.FILE_STORAGE_UPLOAD_MAX_SIZE }),
|
||||
multipart({
|
||||
maximumFileSize: Math.max(
|
||||
env.FILE_STORAGE_UPLOAD_MAX_SIZE,
|
||||
env.MAXIMUM_IMPORT_SIZE
|
||||
),
|
||||
}),
|
||||
async (ctx: APIContext<T.FilesCreateReq>) => {
|
||||
const actor = ctx.state.auth.user;
|
||||
const { key } = ctx.input.body;
|
||||
|
@ -44,7 +44,10 @@ api.use(
|
||||
bodyParser({
|
||||
multipart: true,
|
||||
formidable: {
|
||||
maxFileSize: env.FILE_STORAGE_UPLOAD_MAX_SIZE,
|
||||
maxFileSize: Math.max(
|
||||
env.FILE_STORAGE_UPLOAD_MAX_SIZE,
|
||||
env.MAXIMUM_IMPORT_SIZE
|
||||
),
|
||||
maxFieldsSize: 10 * 1024 * 1024,
|
||||
},
|
||||
})
|
||||
|
Reference in New Issue
Block a user