Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Dictionary<string, string>[] getInitUploadRequestsData(IRestResponse initUploadSignedResponse)
- {
- int numberOfRequests = (int)getInitUploadCommonData(initUploadSignedResponse)["NumberOfRequests"];
- Dictionary<string, string>[] requestsDataArray = new Dictionary<string, string>[numberOfRequests];
- InitUploadSignedResponse initUploadSignedResponseJson = JsonConvert.DeserializeObject<InitUploadSignedResponse>(initUploadSignedResponse.Content);
- for (int i = 0; i < numberOfRequests; i++)
- {
- Dictionary<string, string> requestData = new Dictionary<string, string>();
- string blobName = initUploadSignedResponseJson.RequestToUploadFileList[i].BlobName;
- string fileName = initUploadSignedResponseJson.RequestToUploadFileList[i].FileName;
- string blobUrl = initUploadSignedResponseJson.RequestToUploadFileList[i].Url;
- string method = initUploadSignedResponseJson.RequestToUploadFileList[i].Method;
- string xmsBlobType = "";
- string contentMd5 = "";
- foreach (Header header in initUploadSignedResponseJson.RequestToUploadFileList[i].HeaderList)
- {
- if (header.Key.Equals("x-ms-blob-type"))
- {
- xmsBlobType = header.Value;
- }
- if (header.Key.Equals("Content-MD5"))
- {
- contentMd5 = header.Value;
- }
- }
- requestData.Add("BlobName", blobName);
- requestData.Add("FileName", fileName);
- requestData.Add("Url", blobUrl);
- requestData.Add("Method", method);
- requestData.Add("Content-MD5", contentMd5);
- requestData.Add("x-ms-blob-type", xmsBlobType);
- requestsDataArray[i] = requestData;
- }
- return requestsDataArray;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement