adminjs-upload
adminjs-upload copied to clipboard
[object Object] error text in server's console when trying to save uploaded Image
Node: 20.18.0
adminjs: 7.8.13
@adminjs/express: 6.1.0
@adminjs-upload: 4.0.2
@adminjs/mongoose: 4.1.0
mongoose: 8.7.2
express: 4.21.1
Here's my simplified code block. It works with Local Provider. Please help. Can't find even from where it is called (console.error I mean).
const options: AdminJSOptions = {
componentLoader,
rootPath: '/admin',
resources: [
{
resource: User,
options: {
editProperties: ['file'],
},
features: [
uploadFeature({
componentLoader,
provider: {
gcp: {
bucket: process.env.GOOGLE_CLOUD_STORAGE_BUCKET_NAME,
},
},
properties: {
key: 'displayImage',
mimeType: 'displayImageMimeType',
size: 'displayImageSize',
filename: 'displayImageFilename',
},
validation: {
mimeTypes: ['image/png', 'image/jpeg', 'image/gif', 'image/webp', 'image/avif'],
},
}),
],
},
],
};