adminjs-upload icon indicating copy to clipboard operation
adminjs-upload copied to clipboard

Can not upload file

Open xyz-dev-ops opened this issue 3 years ago • 0 comments

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

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}`,
        }),

xyz-dev-ops avatar Apr 18 '22 13:04 xyz-dev-ops