We help IT Professionals succeed at work.

Uploading files to CGI

305 Views
Last Modified: 2013-11-18
I want send files from the internet browser to my CGI application.

Note:

There is no problem in sending file from browser, but the problem is in receiving that file.

I use STAND-ALONE CGI

Motaz
www.geocities.com/motaz1
Comment
Watch Question

Commented:
When you say 'receiving' the file, what are you trying to do from the Delphi side to read it?

Author

Commented:
I cann't find that function (Reading uploaded file in CGI)

Motaz

Author

Commented:
I cann't find that function (Reading uploaded file in CGI)

Motaz

Author

Commented:
Adjusted points to 200

Author

Commented:
I do not know where is the problem is it in the HTML form ( I use encrypt="multi-part/form-data") or in the CGI, I use this method to read the file:

var
  Buf: array [0 .. 4000] of char;
  Len: Integer;
begin
  Len:= Request.ReadClient(Buf, SizeOf(Buf));
  // The program hangs in this point. and the CGI does not responding
end;

Motaz
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
motaz1@yahoo.com

Thanks

Author

Commented:
Thanks Jamal, you really helped me and help other 4 people, in a three projects. Did you mind to contact you in the future here in Ex-Ex for furthere CGI problems?

Motaz
www.geocities.com/motaz1

Commented:
No problem , anytime.
Just keep the copyrights of that component.
why don't use ISAPI instead of CGI it is more powerful?

Author

Commented:
I didn't think so, any thing in ISAPI can be done using CGI, and I do not want to use web server applications for large systems, I only expect less than 20 concurrent users for all my applications. Moreover when I use ISAPI I need to restart my computer when I need to modify my ISAPI DLL.
If you have a solution for this restarting please tell me.

Thanks very much

Motaz

Author

Commented:
Hi Jamal Kubber.
I've been used your greate component all the time with Delphi 5, now we have a problem in Delphi 6. Did you release a newer version of the component?

Motaz
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.