I want to upload multiple files.
I created the following method, but it does not work well.
Where is it wrong?
************************************************************
//Aras Innovator 11.0 SP12
//Server side , c# Method
Item fileObj1 = inn.newItem("File", "add");
fileObj1.setProperty("filename", "filename1.txt");
fileObj1.attachPhysicalFile(filepath1);
fileObj1 = fileObj1.apply();
Item fileObj2 = inn.newItem("File", "add");
fileObj2.setProperty("filename", "filename2.txt");
fileObj2.attachPhysicalFile(filepath2);
fileObj2 = fileObj2.apply(); // <-- Here Innovator becomes busy.
************************************************************
Thank you.
How does your filepath2 look like? Somehow like this?
`string path = @"C:\\temp\\text.txt";
You can take a look at this sample, but basically it does the same as your code:
github.com/.../AIP_get_SSRS_Report.cs
This sample also contains some code for the file upload. I use an extended version of this and sometimes trigger it 2-3 times in turn. Never had any trouble.
How does your filepath2 look like? Somehow like this?
`string path = @"C:\\temp\\text.txt";
You can take a look at this sample, but basically it does the same as your code:
github.com/.../AIP_get_SSRS_Report.cs
This sample also contains some code for the file upload. I use an extended version of this and sometimes trigger it 2-3 times in turn. Never had any trouble.