Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Http Post upload File Size Limit ?

92 views
Skip to first unread message

Greg McCreath

unread,
Nov 11, 2001, 2:58:18 PM11/11/01
to

Hi All,

Doing my first coding with Indy .. how very cool.

I'm using a TidHTTP component to upload XML files as part of a http post. I
have used the Indy http client example as my starting point.

I have it successfully working for small files, however, when attempting
larger files (1mb) I wait a while and then get a 500 error from the server
and I'm not sure were to start.

I'm afraid I have no control over the technology used at the server. It is
using ASP to convert the file to text and then do stuff with it. However,
my ASP test is simply echoing what I post. Here it is in its entirety ...

dim sXML
dim sStr
iCount = Request.TotalBytes
sXML = Request.BinaryRead(iCount)
For i = 1 to iCount
sStr = sStr & Chr(AscB(MidB( sXML, i, 1 )))
Next

response.write(sStr)

I suppose my question is 'Is there a size limit on post information send by
Indy?'

Is it possible idHTTP is timing out or something, or should I start to track
down some ASP/IIS help on another forum!!

Many Thanks

Greg.
(Sunday Night ... Pink Floyd on the turntable ... nice ... )


Doychin Bondzhev - Team Indy

unread,
Nov 11, 2001, 3:34:40 PM11/11/01
to
Just increase the session timeout

"Greg McCreath" <g...@oqoqo.com> wrote in message news:3beed8e0_1@dnews...

Shiv Kumar

unread,
Nov 11, 2001, 4:47:04 PM11/11/01
to
There is a size limitation on file uploads with respect to the HTTP
protocol. The normal limit is 48K.

What you need to do is use the multipart-formdata encoding type to be able
to successfully upload files that are larger. However, both sides need to
support larger files.

I do have a unit that allows for this with Indy on the client side. I had
sent it over to Chad a few days back. I'm not sure what if anything will
become of it. <g>. I've been using it upload files from a GUI app to a
Server side ISAPI app. The server side is a "normal" app in that, you could
use a browser to upload a file to it or the GUI client with the help of the
unit I mention.

You might want to take a look at my web site (the tutorial tilted -
Multi-File Upload with additional form fields). This is more for the server
side than the client. Now Browsers know how to do the multi-part-formdata
thing. The unit, I mention allows you to use Indy to do it. But the server
side still needs to be able to process it.

You can use the demo on my site, to test your GUI app. The make sure the
file reached the server correctly, you can download the file from the url:

http://www.matlus.com/upload/Youfilename

Let me know if you're interested in this unit. May be I'll write up a
tutorial for the TCP/IP section of my site<g>

--
Shiv Kumar
The Delphi Apostle
http://www.matlus.com
http://www.delphisoap.com


Greg McCreath

unread,
Nov 12, 2001, 3:33:00 AM11/12/01
to
Is that the ASP timeout or the Indy timeout?

"Doychin Bondzhev - Team Indy" <doy...@dsoft-bg.com> wrote in message
news:3beee0e9_1@dnews...

Greg McCreath

unread,
Nov 12, 2001, 3:34:49 AM11/12/01
to
Thanks Shiv,

Can you send me the Unit? I'll have to see how to get ASP to support larger
files ...

"Shiv Kumar" <sh...@erols.com> wrote in message news:3beef1ee$1_2@dnews...

Doychin Bondzhev - Team Indy

unread,
Nov 12, 2001, 4:04:57 AM11/12/01
to
the ASP.

"Greg McCreath" <g...@oqoqo.com> wrote in message news:3bef89c3_2@dnews...

Shiv Kumar

unread,
Nov 12, 2001, 4:47:33 PM11/12/01
to
Greg,

I've posted a short tutorial on my site in the TCP/IP section. The project
source and the unit that contains the class declaration is available at the
end of the tutorial as a zip file. Let me know if you get it.

regards,

0 new messages