| | |
| | | btnUpSelect.Click += BtnUpSelect_Click; |
| | | btnUp.Click += BtnUp_Click; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string parentGuid |
| | | { |
| | | get; |
| | | set; |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string parentGroup |
| | | { |
| | | get; |
| | | set; |
| | |
| | | |
| | | private async Task UploadFileAsync(string url, string filePath) |
| | | { |
| | | |
| | | string _parentGuid = parentGuid; |
| | | using (var httpClient = new HttpClient()) |
| | | try |
| | |
| | | using (var fs = File.OpenRead(filePath)) |
| | | using (var streamContent = new StreamContent(fs)) |
| | | { |
| | | form.Add(streamContent, "file", _parentGuid + "~" + Path.GetFileName(filePath)); |
| | | form.Add(streamContent, "file", _parentGuid + "~" + Path.GetFileName(filePath) + "~" + parentGroup); |
| | | var response = await httpClient.PostAsync(url, form); |
| | | var responseString = |
| | | await response.Content.ReadAsStringAsync(); |