zachg
(Zach Griffeth)
January 31, 2025, 4:17pm
2
datadaddy:
DocStarUploadFile
Hi Scott,
Jose Gomez posted code to do attachments via REST and his example specifically uses the DocStar endpoint - though the entire process is the same with the regular UploadFile function as well.
This is an example using DocStar but the BO’s are the same just use UploadFile instead of DocStarUploadFile
//Read file from Disk into a byte array
Byte[] bytes = File.ReadAllBytes(x);
String fileData = Convert.ToBase64String(bytes);
//Create the File Object to be uploaded to Epicor
var file = new
{
fileName = System.IO.Path.GetFileName(x),
data = fileData,
…
Oh and for reading the file: How To: Kinetic - Upload a Client File, Parse, and Display in a Grid - Experts’ Corner - Epicor User Help Forum
In Kinetic, at least. Classic is direct access.