(I checked on Network tab for the website itself and it can upload ~1500 lines of code) When I try to execute the code,
Error: System.UriFormatException: InvalidURI: The Uri string is too long.
if (Input.Text.Replace(" ", "").Length == 0) {
PGD.Content = "You must fill out the text box!";
return;
}
try
{
using (var wc = new HttpClient())
{
wc.DefaultRequestHeaders.Add("User-Agent", "FlameIgniterDPasteTool");
var x1 = new MultipartFormDataContent
{
{ new StringContent(Uri.EscapeDataString(Input.Text), Encoding.UTF8, "application/x-www-form-urlencoded"), "content" }
};
HttpResponseMessage res = await wc.PostAsync("/", x1);
PGD.Content = res.Content.ReadAsStringAsync();
}
}
catch (Exception ex) {
PGD.Content = "Error: " + ex.ToString();
}
Progress.IsEnabled = false;
await Task.Delay(1000);
Progress.IsEnabled = true;
Input.Text -> A text box for user to enter to be posted to DPaste