mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
increase max files per req
This commit is contained in:
parent
fd9687bef0
commit
ec7de4b52f
@ -12,7 +12,7 @@ function resolveToUrl(filepath, req) {
|
|||||||
|
|
||||||
// TODO: Get maximunFileSize by type of user subscription (free, premium, etc) when `PermissionsAPI` is ready
|
// TODO: Get maximunFileSize by type of user subscription (free, premium, etc) when `PermissionsAPI` is ready
|
||||||
const maximumFileSize = 80 * 1024 * 1024 // max file size in bytes (80MB) By default, the maximum file size is 80MB.
|
const maximumFileSize = 80 * 1024 * 1024 // max file size in bytes (80MB) By default, the maximum file size is 80MB.
|
||||||
const maximunFilesPerRequest = 10
|
const maximunFilesPerRequest = 20
|
||||||
const acceptedMimeTypes = [
|
const acceptedMimeTypes = [
|
||||||
"image/jpeg",
|
"image/jpeg",
|
||||||
"image/png",
|
"image/png",
|
||||||
@ -120,11 +120,16 @@ export default class FilesController extends Controller {
|
|||||||
const results = await new Promise((resolve, reject) => {
|
const results = await new Promise((resolve, reject) => {
|
||||||
const processedFiles = []
|
const processedFiles = []
|
||||||
|
|
||||||
|
// create a new thread for each file
|
||||||
form.parse(req, async (err, fields, data) => {
|
form.parse(req, async (err, fields, data) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
return reject(err)
|
return reject(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Array.isArray(data.files)) {
|
||||||
|
data.files = [data.files]
|
||||||
|
}
|
||||||
|
|
||||||
for await (let file of data.files) {
|
for await (let file of data.files) {
|
||||||
// check if is video need to transcode
|
// check if is video need to transcode
|
||||||
switch (file.mimetype) {
|
switch (file.mimetype) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user