This project is read-only.
1
Vote

root upload

description

Is it possible to upload a document to the root folder? Passing nothing to the UploadWebFile doenst work, it always expects a folder resource id.

comments

stanley700 wrote Dec 2, 2013 at 4:30 PM

It is possible. Check this out:
               string clientId = "stanley700@outlook.com", clientSecret = "22flair4real";
                var ser = new SkyDriveServiceClient();
                ser.LogOn(clientId, clientSecret);
var objWebFolder = ser.CreateRootWebFolder(GlobalConstants.FolderDocument, WebFolderCategoryType.Documents, WebFolderItemShareType.Private);
                    if (objWebFolder != null && !string.IsNullOrEmpty(objWebFolder.OwnerCid))
                    {
                        rootWebFolder = objWebFolder;
                    }
                var webFolder1 = ser.UploadWebFile(path, rootWebFolder);
This will do the trick!!!! Take charge!

hwoplex wrote Dec 26, 2013 at 12:09 PM

Hi,

where are the GlobalConstants defined? What is the string content of GlobalConstants.FolderDocument?

Heiko