예제 #1
0
 /// <summary>
 /// Uploads a File to Dropbox in chunks that are assembled into a single file when finished.
 /// </summary>
 /// <param name="chunkNeeded">The callback function that returns a byte array given an offset</param>
 /// <param name="path">The full path of the file to upload to</param>
 /// <param name="success">The callback Action to perform on completion</param>
 /// <param name="failure">The callback Action to perform on exception</param>
 /// <param name="progress">The optional callback Action that receives upload progress</param>
 /// <param name="overwrite">Specify wether the file upload should replace an existing file</param>
 /// <param name="parentRevision">The revision of the file you're editing</param>
 /// <param name="fileSize">The total size of the file if available</param>
 /// <param name="maxRetries">The number of times to retry uploading if a chunk fails, unlimited if null.</param>
 public void UploadChunkedFileAsync(Func<long, byte[]> chunkNeeded, string path, Action<MetaData> success, Action<DropboxException> failure, Action<ChunkedUploadProgress> progress = null, bool overwrite = true, string parentRevision = null, long? fileSize = null, long? maxRetries = null)
 {
     var chunkedUploader = new DropNet.Helpers.ChunkedUploadHelper(this, chunkNeeded, path, success, failure, progress, overwrite, parentRevision, fileSize, maxRetries);
     chunkedUploader.Start();
 }
예제 #2
0
        public void UploadChunkedFileAsync(Func <long, byte[]> chunkNeeded, string path, Action <MetaData> success, Action <DropboxException> failure, Action <ChunkedUploadProgress> progress = null, bool overwrite = true, string parentRevision = null, long?fileSize = null, long?maxRetries = null)
        {
            var chunkedUploader = new DropNet.Helpers.ChunkedUploadHelper(this, chunkNeeded, path, success, failure, progress, overwrite, parentRevision, fileSize, maxRetries);

            chunkedUploader.Start();
        }
예제 #3
0
 /// <summary>
 /// Uploads a File to Dropbox in chunks that are assembled into a single file when finished.
 /// </summary>
 /// <param name="chunkNeeded">The callback function that returns a byte array given an offset</param>
 /// <param name="path">The full path of the file to upload to</param>
 /// <param name="progress">The optional callback Action that receives upload progress</param>
 /// <param name="overwrite">Specify wether the file upload should replace an existing file</param>
 /// <param name="parentRevision">The revision of the file you're editing</param>
 /// <param name="fileSize">The total size of the file if available</param>
 /// <param name="maxRetries">The number of times to retry uploading if a chunk fails, unlimited if null.</param>
 async public Task<MetaData> UploadChunkedFileAsync(string path, Func<long, byte[]> chunkNeeded, Action<ChunkedUploadProgress> progress = null, bool overwrite = true, string parentRevision = null, long? fileSize = null, long? maxRetries = null)
 {
     var chunkedUploader = new DropNet.Helpers.ChunkedUploadHelper(this, chunkNeeded, path, progress, overwrite, parentRevision, fileSize, maxRetries);
     return await chunkedUploader.StartAsync();
 }