/// <summary> /// Upload blob file with progress report callback and progress oncomplete callback but without updating database /// </summary> /// <param name="name_Container">Name of Container</param> /// <param name="Name_ZipPatchForUpload">Name of blob file</param> /// <param name="path_ZipPatchFiles">Path of blob file on local disk</param> /// <param name="blockSize">Size of datablock for uploading every excute time</param> /// <param name="onProgress">Upload Onprogress callback</param> /// <param name="OnComplete">Upload OnComplete callback</param> public async void UploadFileProgressivelyWithoutUpDate(string name_Container, string Name_ZipPatchForUpload, string path_ZipPatchFiles, int blockSize, Action <double, string> onProgress, Action <string> OnComplete) { try { await AzureStorageManager.UploadFromFileProgressively(name_Container, Name_ZipPatchForUpload, path_ZipPatchFiles, blockSize, (double percent) => onProgress(percent, "Uploading"), () => { OnComplete("Uploading"); }); } catch (Exception ex) { PrintError("Name of container or Path of zip file is invalid. Error Message: " + ex.Message); } }
/// <summary> /// Upload blob file with progress report callback and progress oncomplete callback /// </summary> /// <param name="name_Container">Name of Container</param> /// <param name="Name_ZipPatchForUpload">Name of blob file</param> /// <param name="path_ZipPatchFiles">Path of blob file on local disk</param> /// <param name="blockSize">Size of datablock for uploading every excute time</param> /// <param name="versionOne">Version number of old patch number</param> /// <param name="versionTwo">Version number of latest patch number</param> /// <param name="onProgress">Upload Onprogress callback</param> /// <param name="OnComplete">Upload OnComplete callback</param> public async void UploadFileProgressively(string name_Container, string Name_ZipPatchForUpload, string path_ZipPatchFiles, int blockSize, string versionOne, string versionTwo, Action <double, string> onProgress, Action <string> OnComplete) { try { await AzureStorageManager.UploadFromFileProgressively(name_Container, Name_ZipPatchForUpload, path_ZipPatchFiles, blockSize, (double percent) => onProgress(percent, "Uploading"), () => { OnComplete("Uploading"); Debug.Log("Trying to update info on database, but links to database had been removed."); //AzureRestPatchAPI patchAPI = new AzureRestPatchAPI(AzureRestClient.UrlEndpoint + AzureRestClient.AddPatchEndpoint, AzureRestAPI.HttpVerb.POST); //patchAPI.UploadingPatch(versionOne, versionTwo, FileHelper.FindMD5(path_ZipPatchFiles), GetSizeOfFile(path_ZipPatchFiles), name_Container, Name_ZipPatchForUpload); }); } catch (Exception ex) { PrintError("Name of container or Path of zip file is invalid. Error message: " + ex.Message); } }