Board index » delphi » Http Post upload File Size Limit ?

Http Post upload File Size Limit ?

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 ... )

 

Re:Http Post upload File Size Limit ?


Just increase the session timeout

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

> 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 ... )

Re:Http Post upload File Size Limit ?


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

Re:Http Post upload File Size Limit ?


Is that the ASP timeout or the Indy timeout?

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

Quote
> Just increase the session timeout

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

> > 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 ... )

Re:Http Post upload File Size Limit ?


Thanks Shiv,

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

Quote
"Shiv Kumar" <sh...@erols.com> wrote in message news:3beef1ee$1_2@dnews...
> 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

Re:Http Post upload File Size Limit ?


the ASP.

Quote
"Greg McCreath" <g...@oqoqo.com> wrote in message news:3bef89c3_2@dnews...
> Is that the ASP timeout or the Indy timeout?

> "Doychin Bondzhev - Team Indy" <doyc...@dsoft-bg.com> wrote in message
> news:3beee0e9_1@dnews...
> > Just increase the session timeout

> > "Greg McCreath" <g...@oqoqo.com> wrote in message

news:3beed8e0_1@dnews...
Quote

> > > 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 ... )

Re:Http Post upload File Size Limit ?


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,
--
Shiv Kumar
The Delphi Apostle
http://www.matlus.com
http://www.delphisoap.com

Other Threads