adminjs
adminjs copied to clipboard
Can't find uploaded asset at request payload
Describe the bug When I try to upload file, I can't find uploaded object at payload. So Prisma throws error "Can't find images field!"
Installed libraries and their versions "@adminjs/design-system": "^3.0.0", "@adminjs/express": "^5.0.0", "@adminjs/prisma": "^3.0.1", "@adminjs/upload": "^3.0.0", "@prisma/client": "^4.1.0", "adminjs": "6.1.6",
To Reproduce make resource like this
{
resource: {
model: dmmf.modelMap.UploadTest,
client,
},
features: [
uploadFileFeature({
provider: {
aws: {
region: "ap-northeast-2",
bucket: "sampleBucket",
},
},
properties: {
key: "image",
mimeType: "imageType",
},
}),
],
},
And, Add files on File input (I think this will be replacement image input... but it places just file input)
Expected behavior Successfully uploaded image
Screenshots If applicable, add screenshots to help explain your problem.
Are you sure the configuration is valid?
Can't find images field!
implies there should be an images
fields but I cannot see it in your config.
I wrote this model from prisma.
model UploadTest {
image String
imageType String
}