adminjs icon indicating copy to clipboard operation
adminjs copied to clipboard

Can't find uploaded asset at request payload

Open nabi-chan opened this issue 2 years ago • 3 comments

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) 스크린샷 2022-09-06 오후 2 48 56

Expected behavior Successfully uploaded image

Screenshots If applicable, add screenshots to help explain your problem.

nabi-chan avatar Sep 06 '22 05:09 nabi-chan

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.

dziraf avatar Sep 13 '22 10:09 dziraf

I wrote this model from prisma.

model UploadTest {
  image String
  imageType String
}

nabi-chan avatar Sep 14 '22 02:09 nabi-chan