In AdminJS document, it says I can change max file size in upload feature validation. I tried, but it does change on frontend side showing (max file size: 1gb) but it still shows error on the server with max file exceeded 200mb. (this error is from formidable, not from the server) I know that AdminJS upload feature is using express formidable, and I want to know how to change the maximum file size on the server. This is my code with AdminJS.
uploadFeature({
componentLoader,
provider: { aws: AWScredentials },
validation: {
mimeTypes: ['image/png', 'image/jpeg', 'application/pdf', 'application/zip', 'application/vnd.rar', 'application/x-rar-compressed', 'application/octet-stream', 'application/x-zip-compressed', 'multipart/x-zip', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.presentation'],
maxSize: 500 * 1024 * 1024 // 1000000000
},
uploadPath: (record, filename) => {
return `download/${filename}`
}
}),
],
Is there any solution to change directly on server (i'm using nginx), or do I need to edit on code? and how?
Here i have used the above validation property to restrict the file upload for 1MB. you can use
unsupportedSizefor the required size as needed.for more refer here : DropZone in adminjs