Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
I am facing the same issue.
Attaching the curls if anyone can help me out.
for stagedUploadImage:
return await axiosGQL({
data: {
query: `mutation generateStagedUploads {
stagedUploadsCreate(input: [
{
filename: "${image.name}",
mimeType: "${image.type}",
resource: IMAGE,
fileSize: "${image.size}",
},
])
{
stagedTargets {
url
resourceUrl
parameters {
name
value
}
}
userErrors {
field, message
}
}
}
`,
}
})
for uploading:
"curl --location --request PUT 'https://shopify-staged-uploads.storage.googleapis.com/tmp/67265462582/products/30f0290e-aa18-4b01-84...' \
--header 'Content-Length: 8671' \
--header 'acl: private' \
--header 'content_type: image/png' \
--form 'file=@"/C:/Users/SAURAV SINGH RAUTHAN/Downloads/sizeChart.png"