3 Replies Latest reply: Aug 23, 2011 3:55 AM by Jason Cwik RSS

How to upload a file into the directory in the atmos using .NET

kartike

Hi,


I am looking to implement the sample to upload a file in a particular directory in cloud.I have followed the ideas in below link.

 

https://community.emc.com/docs/DOC-3482

 

sample code :

 

I have written lik this,

 

EsuRestApi cloudRest = new EsuRestApi(host, port, username, secret);

 

Acl acl = new Acl();

 

acl.AddGrant(

 

new Grant(new Grantee(cloudRest.GetUid(), Grantee.GRANTEE_TYPE.USER), Permission.FULL_CONTROL));

 

EsuApi cloud = cloudRest;UploadHelper upload = new UploadHelper(cloud);

 

try

 

{oId = upload.CreateObjectOnPath(


new ObjectPath("/sample/"), "C:/Users/karthike/Desktop/karthik/documents/pssswords.txt", acl, null);

 

}

 

Is this correct? Once i check out whether the file uploaded or not in AtmosFox plugin.I coundn't find the uploaded file.But Created directory is there.

 

Can you please give me solution If i did anything wrong?