Skip to main content
Home
Live to Learn!

Main navigation

  • Home
  • Learn
    • FoxPro
    • MS-DOS
    • C PRG
    • Java
    • ASP
    • Ruby on Rails
    • ASP.NET
    • E-Books
    • Exam Preparation
    • Tools
  • Blog
  • Forums
  • Contact
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Cloud API Implementation Tutorials
  3. Sharpbox API

Dropbox - Uploading a File

Book navigation

  • Google App Engine
  • Sharpbox API
    • Dropbox - Listing files
    • Dropbox - Uploading a File
By Karthikeyan , 11 August, 2013
Before using this code make sure you added necessary references to sharpbox dll files and you generated the token file(SharpDropBox.Token) using Dropbox Token Issuer Tool (Revised) for Sharpbox . using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using AppLimit.CloudComputing.SharpBox; using AppLimit.CloudComputing.SharpBox.StorageProvider.DropBox; namespace StatsUploader { class UploadtoDropbox { public void Upload() { CloudStorage dropBoxStorage = new CloudStorage(); var dropBoxConfig = CloudStorage.GetCloudConfigurationEasy(nSupportedCloudConfigurations.DropBox); ICloudStorageAccessToken accessToken = null; using (FileStream fs = File.Open("SharpDropBox.Token", FileMode.Open, FileAccess.Read, FileShare.None)) { accessToken = dropBoxStorage.DeserializeSecurityToken(fs); } var storageToken = dropBoxStorage.Open(dropBoxConfig, accessToken); String srcFile = @"D:\statsuploader\stats.ecy"; dropBoxStorage.UploadFile(srcFile, "/"); if (dropBoxStorage.IsOpened) { dropBoxStorage.Close(); } } } }
  • Add new comment
Tags
Dropbox API
Sharpbox
Cloud Computing

Comments

Featured Blog Posts

Convert Currency in Number to Words (Indian Rupees) - MS Excel
Foxpro Tutorial and Programs
Convert Currency in Number to Words in MS Word
Convert Currency in Number to Words (Indian Rupees) - Version 2
Best way to Use Rupee Symbol in Windows – Easy steps
Convert Currency in Number to Words - MS Access
Creating All in One Windows XP DVD with all Important Applications
RSS feed

© 2009-2025 Live to Learn.In

Terms of Use | Privacy Policy