0

I need upload my file to "https://file.io" and i tried this:

   `private void buttonInput_Click(object sender, EventArgs e)
    {
        using (WebClient client = new WebClient())
        {
            var resStr = client.UploadFile("https://file.io", @"C:\data\test.txt");
            var jObjResult = JObject.Parse(Encoding.UTF8.GetString(resStr));
            var linkToFile = jObjResult["link"];
        }
    }`

It does upload target txt file to url.

But im taking that error:

Severity Code Description Project File Line Hide Status Error CS01 'JObject' scope valid03

enter image description here

How to Fix it?

Btw im using them:

using System;
using System.Net;
using System.Text;
using System.Collections.Generic;

0 Answers0