There seem to be two ways to upload images: using the BulkImage service or using the AddMediaRequest.
I wanted to use the BulkImage service, but I kept getting the error "4018 - CampaignServiceMediaDataEncodingInvalid - Data in one of the media entities is not in a valid format". I asked our administrators and they assured me that the bingbot is allowed to access our image server and that there were successful requests at the time I was getting the errors.
Since I couldn't get the BulkImage service to work, I tried adding the images the other way: Like the bingbot (should do), I load the images from the image server and upload them using the AddMediaRequest. However, I cannot add the image name/text there, but I need it to identify the image by the text. If I upload more than one image at a time, I don't know which of the returned mediaIds belong to which image.
My workaround is to upload the images one at a time and use the BulkImage service to modify the text using the mediaId provided by the AddMediaResponse.
I find this way of uploading the images quite hacky and would love it if the Image object contained a text attribute. That way I could upload the images in a batch and wouldn't have to modify the BulkImage afterwards. Another possibility is that the BulkImage service is accepting my URLs, but the error message is too generic to understand exactly what the problem is.
I am having a problem uploading image assets.
There seem to be two ways to upload images: using the BulkImage service or using the AddMediaRequest.
I wanted to use the BulkImage service, but I kept getting the error "4018 - CampaignServiceMediaDataEncodingInvalid - Data in one of the media entities is not in a valid format". I asked our administrators and they assured me that the bingbot is allowed to access our image server and that there were successful requests at the time I was getting the errors.
Since I couldn't get the BulkImage service to work, I tried adding the images the other way: Like the bingbot (should do), I load the images from the image server and upload them using the AddMediaRequest. However, I cannot add the image name/text there, but I need it to identify the image by the text. If I upload more than one image at a time, I don't know which of the returned mediaIds belong to which image.
My workaround is to upload the images one at a time and use the BulkImage service to modify the text using the mediaId provided by the AddMediaResponse.
I find this way of uploading the images quite hacky and would love it if the Image object contained a text attribute. That way I could upload the images in a batch and wouldn't have to modify the BulkImage afterwards. Another possibility is that the BulkImage service is accepting my URLs, but the error message is too generic to understand exactly what the problem is.