Answer the question
In order to leave comments, you need to log in
Why can't I upload a file from a folder to the server via UploadFile?
I'm trying to upload a file from the TEST folder in the root of the program to the server
var wc = new WebClient();
var responseFile = Encoding.ASCII.GetString(wc.UploadFile(p, "TEST\\test.txt")); // p - адрес загрузки
"{\"error\":\"empty_file\",\"error_descr\":\"empty_file\",\"error_is_logged\":false}"
var wc = new WebClient();
var responseFile = Encoding.ASCII.GetString(wc.UploadFile(p, "test.txt")); // p - адрес загрузки
Answer the question
In order to leave comments, you need to log in
The problem was that the files were empty. After filling the file with information - everything turned out.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question