Adding a text file via .NET API
Monday, November 21, 2022 at 06:11amUsing the OneSpanSign.sdk there is no document type for text files, which may or may not have the TXT extension. I can drag and drop files via the UI into transactions but I don't see any easy way using the API to upload them.
Reply to: Adding a text file via .NET API
Monday, November 21, 2022 at 03:33pmHi Richard,
If we are talking about using .NET SDK to upload .txt file, I believe there are two methods:
DocumentBuilder.NewDocumentNamed("Sample Agreement")
.FromStream(File.OpenRead("path_to_file\\contract.txt"),DocumentType.PDF)
or
.FromFile("path_to_file\\contract.txt")
From my test, even for the first method which requires a stream and a document type, passing in DocumentType.PDF didn't cause an error for me.
Duo