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

[object Object] error text in server's console when trying to save uploaded Image

Open alexoleynik0 opened this issue 1 year ago • 0 comments

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'],
                    },
                }),
            ],
        },
    ],
};

alexoleynik0 avatar Oct 24 '24 06:10 alexoleynik0