{resource: IFile,
options:
{
navigation: HomePage,
properties: {
key: {
type: 'string',
},
// s3Key: {
// type: 'string',
// },
bucket: {
type: 'string',
},
mime: {
type: 'string',
},
comment: {
type: 'textarea',
isSortable: false,
},
},
},
features: [
uploadFeature({
componentLoader,
provider: { aws: S3_Credentials },
validation: { mimeTypes: ['image/png'] },
options:{
key: process.env.AWS_ACCESS_KEY_ID,
// s3Key: process.env.AWS_ACCESS_KEY_ID,
bucket: process.env.AWS_S3_BUCKET,
mime: 'image/png',
},
}),
],
},
I tried to insert an Image in MongoDB using Mongoose with the help of AWS S3, and by the documentation of @adminjs/upload, I got the code. When I got the above error, I replaced "s3Key" with "key" but nothing works..!!
I also tried it with Local File System, but got the same error there as well.
features: [
uploadFeature({
provider: localProvider,
validation: {
mimeTypes: ['image/png', 'application/pdf'],
},
options: {
key: 323,
bucket: './public/files',
s3Key: 'uploadFeature',
},
}),
],
I use https://docs.adminjs.co/basics/features/upload for reference.