Closed mermich closed 6 months ago
Here is the sample code used for both the 3.1.1 and 2.126.0 versions : ` private static void Main(string[] args) { Console.WriteLine("dmoe latest (wrong upload...)");
// create client.
var bld = new Smartsheet.Api.SmartsheetBuilder() { };
bld.SetAccessToken("XXX");
var client = bld.Build();
// attach a random pdf
client.SheetResources.AttachmentResources.AttachFile(0000, "C:\\source\\someDemo.pdf", "application/pdf");
}`
The pdfs are both created onto smartsheet, but the size are different and with the 3.1.1 version of the Smartsheet SDK, the file is correucpted and cannot be displyed in the browser or anywhere. The issue is related to the changes mades to the DefaultHttpClient, more specificly encoding the file...
Hi @mermich thank you for reporting this issue. With 3.1.2 we have updated the attachment uploading path associated with this call and I believe it will resolve your issue if you update but do please let us know if the issue remains
I upgraded my version of the nuget package and was able to corrrectly update attachments.
The newest versions of the API and more specificly the DefaultHttpClient changed the way parameters and files were sent over Smartsheet servers, corrupting them.
Reproduction steps and explainations will soon follow.