This project is read-only.

Upload to public folder

Sep 9, 2010 at 7:34 PM

Hi!

Is there a way to upload file into public folder ?

In this sample we have acces to root folder.

               // get the root entry of the cloud storage
            ICloudDirectoryEntry root = storage.GetRoot();
            if (root == null)
            {
                Console.WriteLine("No root object found");
            }
            else
            {
                // create the file
                ICloudFileSystemEntry file = storage.CreateFile(root, "up.load");

Sep 10, 2010 at 8:40 PM

Hi,

their is only one thing to do: Get the child from the root folder which has the name "Public" and use this reference in CreateFile.

Inspired from your question I added a new feature in the current trunk, which allows you to get direct access to a specific path. Let's have a look to this documentation: http://sharpbox.codeplex.com/wikipage?title=Folder%20access%20via%20path%20string&referringTitle=Documentation

Additionally I will an other helper function which allows you to upload and download a file directly with handling the generic business objects in your code.

reagrds

Dirk

 

Sep 10, 2010 at 11:32 PM

Hi,

I finished the comfort function, thanks for your inspiration:

http://sharpbox.codeplex.com/wikipage?title=Up-%20and%20Download%20File&referringTitle=Documentation

regards

Dirk

Sep 13, 2010 at 1:27 PM

thank you!