All things Shopify and commerce
Hey everyone,
I’m trying to upload new products to my store but keep getting ‘media upload failed to process because the image could not be processed’
Does anyone know why and how to fix this? It seems to happening to only some of the images, I’ve never had this issue before but need to desperately get new products onto the site.
Please let me know if anyone has a solution! Thanks
I am having the same issue. Is there any way of debugging the issue?
Did anyone find a fix on this, I'm getting the same issue. Please please help!
I am also struggling to upload media. Tried all different file types and have had mild success uploading from URL but that's it.
I am having this problem uploading GLBs to to products using the API. I don't know if it is a problem with my code or with Shopify.
Did anyone ever get this figured out?
I can't upload the same animated GIF I uploaded a week ago.
This error shows up when I try to upload pictures below the max permitted Size. PLEASE HELP
File upload failed A processing error occurred. Try again.
Here is my python script for uploading media.
def form_query(name):
username = os.getenv("SHOPIFY_ID")
password = os.getenv("SHOPIFY_PASSWORD")
glb_path = get_local_glb_path(name)
filesize = str(os.path.getsize(glb_path))
headers = {
'Content-Type': 'application/json',
'X-Shopify-Access_Token' : shopify.StorefrontAccessToken.headers['X-Shopify-Access-Token'],
'X-Upload-Content-Length': filesize,
'x-upload-content-type': 'application/octet-stream'
}
url = form_graphql_url()
variables = {
"input" : [
{
"filename": "{}.glb".format(name),
"mimeType": "model/gltf-binary",
"resource": "MODEL_3D",
"fileSize": filesize
}
]
}
query = '''
mutation generateStagedUploads($input: [StagedUploadInput!]!) {
stagedUploadsCreate(input: $input) {
stagedTargets {
url
resourceUrl
parameters {
name
value
}
}
}
}
'''
return {
'query' : query,
'variables': variables,
'url': url,
'headers': headers,
'filesize': filesize
}
Then I call the query.
def post_graphql(url, query, params, headers):
r = requests.post(url,json={"query": query, "variables": params}, headers=headers)
return r
r = post_graphql(get_glb_dict['url'], get_glb_dict['query'], get_glb_dict['variables'], headers2)
print(json.dumps(r.json(), indent=4, sort_keys=True))
User | RANK |
---|---|
68 | |
49 | |
36 | |
34 | |
29 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022