0

I am trying to post image via the REST Api using the catalogProductAttributeMediaGalleryManagementV1 service, but getting error in base64_encoded_data. The error is "The string is not a valid base64 encoded data"

{
  "entry":{
    "type":"image",                                              
    "label":"Image",
    "media_type":"image",
    "disabled":false,
    "content":[
      {
        "type":"image/jpeg",
        "name":"abc.jpg",
        "base64_encoded_data":"\/9j\/4AAQSkZJRgABAQAA..."
      }
    ],
    "position":1,
    "file":"abc.jpg"
  }
}

How can I resolve this?

  • are u calling rest api code in php or any other lang? – Abdul Jan 12 '18 at 13:26
  • I am using c# to call. – akshay billore Jan 12 '18 at 13:34
  • try to change name with "name":"abc.jpeg" – mansi Jan 13 '18 at 5:16
  • tried both, but still not working. – akshay billore Jan 15 '18 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.