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 ... )
"Greg McCreath" <g...@oqoqo.com> wrote in message news:3beed8e0_1@dnews...
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
"Doychin Bondzhev - Team Indy" <doy...@dsoft-bg.com> wrote in message
news:3beee0e9_1@dnews...
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...
"Greg McCreath" <g...@oqoqo.com> wrote in message news:3bef89c3_2@dnews...
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,