Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Post Empty File field with TIdMultiPartFormDataStream

Posted on 2013-05-22
2
Medium Priority
?
1,591 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

705 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