adminjs-upload
adminjs-upload copied to clipboard
Can not upload file
Describe the bug
I need to attach files when I create a new record in a table. With empty files or files that have a small size, everything works perfectly. But for some reason, when you try to attach a pdf with a size of >3 mb, an error pops up in the panel. The console doesn't have it though. Therefore, I have a question: is there a default limit on the file size, and if there is one, is it possible to change it somehow?
Installed libraries and their versions
- [email protected]
- @adminjs/[email protected]
- @adminjs/[email protected]
- @adminjs/[email protected]
Here is the code snippet where I handle file uploading
uploadFeature({
provider: { local: { bucket: path.join(__dirname, '../public/trips') } },
properties: {
file: 'registration.file',
filePath: 'registration.path',
filename: 'registration.filename',
filesToDelete: 'registration.toDelete',
key: 'registration.key',
mimeType: 'registration.mimeType',
bucket: 'registration.bucket',
},
multiple: true,
uploadPath: (record, filename) => `${record.id()}/registration/${filename}`,
}),