Unsolved
This post is more than 5 years old
18 Posts
0
2166
September 26th, 2011 00:00
Couldn't find uploaded files in AtmosFox explorer
Hi,
I am using .net API to upload the files into cloud server.
I can define hostname,port,id, secretkey in code and and upload the file using following method.
ObjectPath path = new ObjectPath("/karthik/UploadFiles/");
string file = "C:/Users/karthike/Desktop/Element.docx";
ObjectId objectId = upload.CreateObjectOnPath(path,file, acl, null);
I can upload and get the sharable url and download the files.
But i couldn't find the uploaded files in the AtmosFox explorer, even i couldn't find the Objectpath. I mentioned same id and key for managed accounts and same end url in preference in AtmosFox explorer that i used in above code.
What i need to do to get the the uploaded files in Atmos Explorer?
Regards,
Karthik.


JasonCwik
281 Posts
0
September 26th, 2011 06:00
Karthik,
In Atmos, ObjectPaths that end with a slash are directories, and the upload helper requires the exact destination path, not the directory you want the file to be placed in. Therefore, the code should be:
ObjectPath path = new ObjectPath("/karthik/UploadFiles/Element.docx");
string file = "C:/Users/karthike/Desktop/Element.docx";
ObjectId objectId = upload.CreateObjectOnPath(path,file, acl, null);
JasonCwik
281 Posts
0
January 10th, 2013 09:00
That's correct; the ObjectPath->isDirectory() method simply checks the syntax of path to see if it's a directory. This is to keep all operations that involve network access constrained to the EsuRestApi object, preventing objects from having methods that create "hidden" network access to Atmos. To check whether a directory really exists, you'll need to perform some operation such as getSystemMetadata() on it. If it does not exist, an EsuException will be thrown with code 1003 (the requested object was not found).
mirando
12 Posts
0
January 10th, 2013 09:00
Why does an Object path get asserted as a directory path (using esuPHP) even if the path is invalid?
$dirPath = new ObjectPath('/syntacticallyvalidbutnonexistentdirectory/');
';
Looking at EsuObjects.php it looks like it doesn't verify if the path actually exists, just if the ObjectPath looks to be valid syntax for a directory path.