Is there a PHP equivalent of the TIdHTTPServer upload handler? I made my own server side working php upload handler on a linux server, but does it not communicate well with the upload example. It does, however, receives upload from a simple html form.
I am guessing that the payload, parameters and responses must match exactly what the WebCore Upload expect. After quickly reading the TWEBFileUpload description I decided to ask first, maybe I can save some developing time if there is already something done on php, or some description on the interaction needed, client <=> server.
Well responding to my own question...
I went through the upload handler project provided for delphi, and found that it is a basic file upload with a trick: the parameter name is fixed to 'file1'.
I made a quick implementation, tested it and since it worked just as expected, I want to share it here.
There are some issues I found that can not correct as quickly.
a) If the upload component in TMS WebCore receives anything but the 'OK' status response from the server, it says the server is not working. So it can not raise any exception or show failure reasons. I have to dig to see if I can correct it.
b) Did not find yet how to implement reporting the upload progress.
c) Can not add extra parameters to the file. But I can do it with a normal HTML form upload call.
So in essence, this port to PHP needs improvement but works just fine to upload one file at a time.
Read the code to review the apache/php settings I found I needed to set.
jdupload.zip (1.5 KB)
Have you made any progress on this since your last post? I'm trying to solve the same problem to get a php script to work.