public void UploadFile(byte[] content, string filename, string target) { ocl = DropboxClient.CreateOAuthClient(APP_KEY, APP_SECRET); ai = ocl.GetAuthorizeInfo(); RequestToken = ai.RequestToken; RequestTokenSecret = ai.RequestTokenSecret; redirect_url = ai.AuthorizeUrl; AccessTokenInfo t = ocl.GetAccessToken(RequestToken, RequestTokenSecret); Token = t.Token; TokenSecret = t.TokenSecret; DropboxClient cl = new DropboxClient(APP_KEY, APP_SECRET, Token, TokenSecret); HigLabo.Net.Dropbox.UploadFileCommand ul = new HigLabo.Net.Dropbox.UploadFileCommand(); ul.Root = RootFolder.Sandbox; ul.FolderPath = target; ul.FileName = filename; ul.LoadFileData(content); Metadata md = cl.UploadFile(ul); }