craftql
craftql copied to clipboard
Mutation: upload file directly from browser
Is there a way to upload an image directly from the Browser, without loading it to a public server before?
Already working:
mutation uploadImage ( $image: [FotoAssetInput] ) {
upsertXYZ ( image: $image ) {
id
}
}
{
"image": [{"url": "https://placekitten.com/g/200/300"}]
}
Seeked feature:
{
"image": [{"file": "File Object"}],
"image": [{"base64": "data:image/jpg;base64,iVBORw0KGgoAAAANSUhEUgAABZwAAAF..."}],
}