diff --git a/Bynder/Sdk/Api/RequestSender/ApiRequestSender.cs b/Bynder/Sdk/Api/RequestSender/ApiRequestSender.cs index 56bb0a3..461bfcc 100644 --- a/Bynder/Sdk/Api/RequestSender/ApiRequestSender.cs +++ b/Bynder/Sdk/Api/RequestSender/ApiRequestSender.cs @@ -90,8 +90,15 @@ public async Task SendRequestAsync(Request request) { return default; } + // Note: for powerpoints, a pdf is automatically generated by Bynder and stored as a second MediaItem. + // However, this MediaItem has a Height and Width of null, which cannot be converted to an int so it breaks. + // The below setting fixes this + var settings = new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore + }; - return JsonConvert.DeserializeObject(responseString); + return JsonConvert.DeserializeObject(responseString, settings); } private async Task CreateHttpRequestAsync(Request request)