Replies: 6 comments
-
Hi, This error most probably means that the Upload instance you created is invalid and graphql-upload fails it's check. I am not an expert in graphql-upload, but have a look at code that works for me (#7986 (comment)). Comparing those, I think you need to promisify your |
Beta Was this translation helpful? Give feedback.
-
Hello, @marekryb But, it is strange issue on my and that I was unable to import Upload standard way, so I've used it like the following.
|
Beta Was this translation helpful? Give feedback.
-
@molotow11 I checked your code and it works fine (except for types). Now that you mentioned that you import keystone/packages/core/package.json Line 252 in a412558 This can create all kind of weird things, including mismatch of class prototypes. Try installing exact version that keystone is using. Also now looking at your error message, you can see that your Upload object has empty promise ( if (value instanceof Upload) return value.promise; |
Beta Was this translation helpful? Give feedback.
-
@marekryb |
Beta Was this translation helpful? Give feedback.
-
It depends how you define stable. Just whenever you update keystone, you need to keep track of |
Beta Was this translation helpful? Give feedback.
-
I encountered this problem when installed
|
Beta Was this translation helpful? Give feedback.
-
Hello, Guys!
I've tried to upload an image via backend api, but not luck.
So, I have local image, getting it as stream, then creating Upload instance.
I've used the following code:
Expected to be Image uploaded but got this error:
Error creating Image GraphQLError: Variable "$data" got invalid value { resolve: [function], reject: [function], promise: {}, file: { createReadStream: [function createReadStream], filename: "tmp.jpg", mimetype: "image/jpeg", encoding: "utf-8" } } at "data.image.upload"; Upload value invalid.
node 16.20.0
Beta Was this translation helpful? Give feedback.
All reactions