Skip to content

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

@alexoleynik0

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions