Post Empty File field with TIdMultiPartFormDataStream

Hi,
I need to do a specific Post request on a specific website form with idhttp.
So I monitored all the POST data with HTTPFOX ( firefox plugin ), and i'm facing a particular problem :

The website requires me to add to my post request an Empty File Field.

It looks like this on HttpFox :
content-Disposition: form-data; name="file"; filename=""
content-type: application/octet-stream

Open in new window


Here's my code for it:

MPData2.addfile('file','','application/octet-stream'); 

Open in new window


This compiles fine, however at runtime when monitoring the requests with IDlogevent, I can see that once it reaches this particular line, the software just stops.It doesn't freeze since everything is threaded.
MobTurboAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
MobTurboConnect With a Mentor Author Commented:
Finally found a solution :

All I had to do was NOT SEND the file parameter the second Time, seems like it wasn't a required parameter after all.
0
 
rotem156Connect With a Mentor Commented:
You're welcome.
0
All Courses

From novice to tech pro — start learning today.