Issue: Media
Category: Issue/Question
Area: API/v1/media
Description: I have been trying to use upload media endpoint with some sample images and in the response I get media resource which i then try to send with message, i get invalid media resource error. Looks like something is not right and I can't see any sample of payload. I am using below payload. Also I have noticed that regardless of image size i get same length of media response back which is 1240 character.
var client = new RestClient("https://kms3.kaiza.la/v1/media");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "multipart/form-data");
request.AddHeader("accesstoken", accessToken);
request.AlwaysMultipartFormData = true;
request.AddFile(fileName, content, fileName); // content is in form of byte[]
IRestResponse responseUploadMedia = client.Execute(request);
MediaResourceResponse mediaUploadApiResponse = JsonConvert.DeserializeObject(responseUploadMedia.Content);
Issue: Media
Category: Issue/Question
Area: API/v1/media
Description: I have been trying to use upload media endpoint with some sample images and in the response I get media resource which i then try to send with message, i get invalid media resource error. Looks like something is not right and I can't see any sample of payload. I am using below payload. Also I have noticed that regardless of image size i get same length of media response back which is 1240 character.
var client = new RestClient("https://kms3.kaiza.la/v1/media");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "multipart/form-data");
request.AddHeader("accesstoken", accessToken);
request.AlwaysMultipartFormData = true;
request.AddFile(fileName, content, fileName); // content is in form of byte[]
IRestResponse responseUploadMedia = client.Execute(request);
MediaResourceResponse mediaUploadApiResponse = JsonConvert.DeserializeObject(responseUploadMedia.Content);