Skip to content

Commit

Permalink
- Adapt to new gofile.io
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaBear84 committed Aug 19, 2020
1 parent 614814e commit 01844a2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions OpenDirectoryDownloader/FileUpload/GoFileIo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ public static async Task<GoFilesFile> UploadFile(HttpClient httpClient, string p

using (MultipartFormDataContent multipartFormDataContent = new MultipartFormDataContent($"Upload----{Guid.NewGuid()}"))
{
multipartFormDataContent.Add(new StreamContent(new FileStream(path, FileMode.Open)), "filesUploaded", Path.GetFileName(path));
multipartFormDataContent.Add(new StringContent("file"), "category");
multipartFormDataContent.Add(new StringContent("0"), "category");
multipartFormDataContent.Add(new StreamContent(new FileStream(path, FileMode.Open)), "file", Path.GetFileName(path));

using (HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"https://{server}.gofile.io/upload", multipartFormDataContent))
using (HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"https://{server}.gofile.io/uploadFile", multipartFormDataContent))
{
if (httpResponseMessage.IsSuccessStatusCode)
{
Expand Down

0 comments on commit 01844a2

Please sign in to comment.