Copy link to clipboard
Copied
Looking to pick some brains here. I'm attempting to post a PDF to the transientDocuments endpoint and running into some (probably very basic) issues - wanted to see if anyone else here ran into the same thing.
In the RestRequest, I've tried the .AddFile() function and also the .AddFileBytes() function, but both ways gives me a error stating:
NO_FILE_CONTENT","message":"Must provide file body"
Code in question:
//request.AddFile(displayName, fileName, "multipart/form-data");
//request.AddFileBytes(displayName, System.IO.File.ReadAllBytes(fileName), displayName, "multipart/form-data");
I am including the File-Name and Mime-Type parameters on the request.
Have something to add?