This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Cannot Upload a file from My Desketop

lena - Monday, March 31, 2014 5:41 AM:

Hello,

In a new form ,I want to attach a filelike this.

string path;

 Item file=myInnovator.newItem("File","add");
 file.setProperty("filename","table2.txt");
 file.attachPhysicalFile(path);
 Item added_file=file.apply();

when the path="C://table2.txt"; It works well .

But when the path is ="C:/Documents and Settings/36602726/??/table2.txt" ,it failed ,error is the file is not exists. the new path is my Desketop. why I cannot attach file from My Desketop.

Or I want to put an existing file into the server. usally  in visual studio it can realize like follow:

string sFilePath = Server.MapPath("~/") + "sfc_res\TempleFile";

string sFileFullPath = sFilePath + "\" + FileUpLoad1.FileName;

  FileUpLoad1.SaveAs(sFileFullPath);            

How to realize the SaveAs() method in Aras.

Thanks for help!

lena