System Information
- Strapi v4:
Hello, I’m having trouble making a mutation to upload an image, before coding it in my app, I’m making the mutation in the GraphQL playground. There was a big change from v3 to v4, no tutorial can help me.
According to Schema, it should be something like this:
mutation {
createUploadFile(data: {
url: "file:///home/gabriel/Downloads/logo-login.png"
}) {
date {
id
}
}
}
Here is an example of the type of arguments
type UploadFileInput {
name: String
alternativeText: String
caption: String
width: int
height: int
formats: JSON
hash: String
ext: String
mime: String
size: float
url: String
previewUrl: String
provider: String
provider_metadata: JSON
folder: ID
folderPath: String
}
as return, I get a “message”: “Internal Server Error”
How should I insert my image? is it correct to send as local file link?