P
pmz
Dear Group,
I'm currently developing a simple Windows application in C#, which is
supposed to upload images - through 'WebClient' - into remote
(FreeBSD/Apache/PHP) server.
What is interesting (and the problem) that my script on the remote
server side says so: UPLOAD_ERR_PARTIAL (php error) - which means that
file was not successfuly (till the eof) uploaded. There is no
possibility of any limits (like php.ini - max_file_upload_size, and
so), so the server-side error case I dismiss. So probably my WebClient
is 'transmitting data' not good enough to the remote server. Anyhow, it
fails.
Source code looks so:
string RemotePath = string.Format("http://{0}/scripts/set-image.php",
ServerHostname);
WebClient InsertClient = new WebClient();
InsertClient.QueryString.Add("CD", "2efa6fd4087b6168a6c14ca1f10785e3");
byte[] Response = InsertClient.UploadFile( RemotePath, "POST", FilePath
);
Nothing seems to be wrong - not many lines to get any mistakes, but it
has failed anyhow.
A. FilePath - file exists, for sure and it's accessible.
B. Remote Server is also up and running, so ain't the problem.
C. Request size is interesting. As I followed Apache log file:
192.168.10.40 - - [17/Jan/2006:07:54:56 +0100] "POST
/scripts/set-image.php?CD=2efa6fd4087b6168a6c14ca1f10785e3 HTTP/1.1"
200 18
18 is a little bit to small for such file (~200kb), isn't it?
If something I've written is not clear enough, please write it down,
I'll try to upgrade my problem with more data.
Anyway, please help.
Best regards,
Przemek M. Zawada
I'm currently developing a simple Windows application in C#, which is
supposed to upload images - through 'WebClient' - into remote
(FreeBSD/Apache/PHP) server.
What is interesting (and the problem) that my script on the remote
server side says so: UPLOAD_ERR_PARTIAL (php error) - which means that
file was not successfuly (till the eof) uploaded. There is no
possibility of any limits (like php.ini - max_file_upload_size, and
so), so the server-side error case I dismiss. So probably my WebClient
is 'transmitting data' not good enough to the remote server. Anyhow, it
fails.
Source code looks so:
string RemotePath = string.Format("http://{0}/scripts/set-image.php",
ServerHostname);
WebClient InsertClient = new WebClient();
InsertClient.QueryString.Add("CD", "2efa6fd4087b6168a6c14ca1f10785e3");
byte[] Response = InsertClient.UploadFile( RemotePath, "POST", FilePath
);
Nothing seems to be wrong - not many lines to get any mistakes, but it
has failed anyhow.
A. FilePath - file exists, for sure and it's accessible.
B. Remote Server is also up and running, so ain't the problem.
C. Request size is interesting. As I followed Apache log file:
192.168.10.40 - - [17/Jan/2006:07:54:56 +0100] "POST
/scripts/set-image.php?CD=2efa6fd4087b6168a6c14ca1f10785e3 HTTP/1.1"
200 18
18 is a little bit to small for such file (~200kb), isn't it?
If something I've written is not clear enough, please write it down,
I'll try to upgrade my problem with more data.
Anyway, please help.
Best regards,
Przemek M. Zawada