How to upload multiple files.

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.
Parents
  • Thank you for your reply. As your advise, I added error handling but it still does not work. The first one is uploadable, but Innovator does not work with the second one. (Innovator freezes unless it restarts in IIS.) It seems that Innovator freezes at "fileObj2.apply();" and an error isn't returned. Is there any other wrong code? Or, please let me know if there is a sample code that has been confirmed.
Reply
  • Thank you for your reply. As your advise, I added error handling but it still does not work. The first one is uploadable, but Innovator does not work with the second one. (Innovator freezes unless it restarts in IIS.) It seems that Innovator freezes at "fileObj2.apply();" and an error isn't returned. Is there any other wrong code? Or, please let me know if there is a sample code that has been confirmed.
Children
No Data