• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

C# / RestSharp file uploads

New Here ,
Sep 14, 2021 Sep 14, 2021

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.

TOPICS
SDK , Send documents

Views

1.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation