stagedUploadsCreate upload error

Topic summary

A developer is encountering an error with Shopify’s stagedUploadsCreate mutation when attempting to upload images.

Issue Details:

  • The mutation is being used to generate staged upload URLs for image files
  • Parameters include filename, mimeType, resource type (IMAGE), and fileSize
  • A cURL command is provided showing the PUT request to the staged upload URL

Current Status:

  • The code snippet appears incomplete or corrupted (reversed/encoded text visible)
  • No solution or response has been provided yet
  • The discussion remains open with the developer seeking assistance from the community

The post lacks clarity due to formatting issues in the shared code, making it difficult to identify the specific error message or failure point.

Summarized with AI on November 23. AI used: claude-sonnet-4-5-20250929.

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"