<HTML><BODY>
<DIV>I came across some code for doing it in a CGI app, and converted it to
a COM app that uses the ASP engine in Delphi, and I THINK I still have the
code for teh CGI app. somewhere.</DIV>
<DIV>Email me offline if you want it.</DIV>
<DIV> </DIV>
<DIV>Jeremy<BR></DIV>
<BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px;
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">-----Original
Message-----<BR>From: Phil Middlemiss <phil@tumonz.co.nz><BR>To: NZ
Borland Developers Group - Delphi List <delphi@ns3.123.co.nz><BR>Date:
Thu, 22 Sep 2005 15:42:45 +1200<BR>Subject: Re: [DUG] ISAPI upload
problem<BR><BR>Thanks for the replies everyone - I've been on a course all
day so have only just read them now.<BR><BR>I am using the
"multipart/form-data" method="post" that Trevor gave an example of (no web
broker). So I think it was a case of needing to keep on reading.<BR><BR>
Thanks for the attachment trevor - I will give it a go.<BR><BR>Cheers,<BR>
Phil.<BR><BR>Stephen Barker wrote:
<BLOCKQUOTE cite=mid0019B0AC6A80D4119E5C204C4F4F50203F569C@NTSERVER
type="cite"><PRE wrap="">Hi Phil,
The problem is likely that the ContentFields property only contains the
first chunk of the file. You have to keep reading up to the content length
to get the full data.
Are you using web broker?
I don't use that - I just use straight ISAPI, but I've got some code for
this if it helps:
TotalBytes := FECB.cbTotalBytes; //Request.ContentLength;
sContentType := FServerVars.values['CONTENT_TYPE'];
p:=Pos('boundary=',LowerCase(sContentType));
sl := TStringList.create;
try
if p>0 then begin
boundary:='--'+trim(copy(sContentType,p+9,length(sContentType)));
ParseMultipart(TotalBytes, FECB,
FECB.lpbData,FECB.cbAvailable,boundary,sl,sFileName);
end;
finally
sl.free;
end;
Plus there's more you might want in the ParseMultipart function.
Regards,
Steve
</PRE>
<BLOCKQUOTE type="cite"><PRE wrap="">-----Original Message-----
From: Phil Middlemiss [<A class=moz-txt-link-freetext
href="javascript:openWin('/WorldClient.dll?Session=LHYYCMN&View=Compose&To=phil@tumonz.co.nz&New=Yes','Compose',800,600,'yes');">
mailto:phil@tumonz.co.nz</A>]
Sent: Thursday, 22 September 2005 9:59 a.m.
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] ISAPI upload problem
I have an ISAPI DLL written in Delphi that provides a form
for uploading a CSV file. When I try to upload the CSV file
it only manages to handle
678 lines and then produces an error (there should be over
1000 lines).
Is there some special handling I have to do to handle uploading files?
At the moment all I am doing is reading the
Request.ContentFields property to access the strings from the
uploaded file.
Cheers,
Phil.
_______________________________________________
Delphi mailing list
<A class=moz-txt-link-abbreviated
href="javascript:openWin('/WorldClient.dll?Session=LHYYCMN&View=Compose&To=Delphi@ns3.123.co.nz&New=Yes','Compose',800,600,'yes');">
Delphi@ns3.123.co.nz</A>
<A class=moz-txt-link-freetext
href="http://ns3.123.co.nz/mailman/listinfo/delphi" target=_blank>
http://ns3.123.co.nz/mailman/listinfo/delphi</A>
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.4/109 - Release
Date: 21/09/2005
</PRE></BLOCKQUOTE><PRE wrap=""><!---->
_______________________________________________
Delphi mailing list
<A class=moz-txt-link-abbreviated
href="javascript:openWin('/WorldClient.dll?Session=LHYYCMN&View=Compose&To=Delphi@ns3.123.co.nz&New=Yes','Compose',800,600,'yes');">
Delphi@ns3.123.co.nz</A>
<A class=moz-txt-link-freetext
href="http://ns3.123.co.nz/mailman/listinfo/delphi" target=_blank>
http://ns3.123.co.nz/mailman/listinfo/delphi</A>
</PRE></BLOCKQUOTE></BLOCKQUOTE>
</BODY></HTML>