not a valid image file type error (.glb)

BeamJokerFavor
Excursionist
36 2 2

I am uploading an image with a post like this:

my_request = {
      "image": 
        {
        "src": "https://glbs.blob.core.windows.net/glb/BFRBTN.glb"
        }

 

and a post like this:

    response = requests.post('https://{}:{}@specialsnowflake.myshopify.com/admin/api/2021-01/products/{}/images.json'.format(username, password,this_item.id), json=my_request)

 

I get the following error:

{"errors":{"image":["\/glb\/BFRBTN.glb is not a valid image file type."]}}

 

Why would this be? Why is it escaping the forward slashes? Why is it glb/BFRBTN.glb and not recognizerd as BFRBTN.glb?

I never wanted to upload to Azure in the first place. As a secondary question, is there a way to upload directly from the file system?

0 Likes