Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

stagedUploadsCreate upload error

stagedUploadsCreate upload error

dipanshu_1009
Shopify Partner
2 0 0

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"

 

Replies 0 (0)