fix API: Disable max upload size when 0 and less

This commit is contained in:
AruMoon 2021-09-22 17:53:30 +05:00
parent 7c22d50e35
commit 141715372f
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ const initChunks = async uuid => {
const executeMulter = multer({
// Guide: https://github.com/expressjs/multer#limits
limits: {
fileSize: Util.config.maxSize * (1000 * 1000),
fileSize: Util.config.maxSize > 0 ? Util.config.maxSize * (1000 * 1000) : Number.MAX_VALUE,
// Maximum number of non-file fields.
// Dropzone.js will add 6 extra fields for chunked uploads.
// We don't use them for anything else.