Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Post Empty File field with TIdMultiPartFormDataStream

Posted on 2013-05-22
2
Medium Priority
?
1,627 Views
Last Modified: 2016-09-30
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.
0
Comment
Question by:MobTurbo
2 Comments
 
LVL 4

Assisted Solution

by:rotem156
rotem156 earned 2000 total points
ID: 39191474
You're welcome.
0
 

Accepted Solution

by:
MobTurbo earned 0 total points
ID: 39191795
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question