<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
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="mailto:phil@tumonz.co.nz">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="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a>
<a class="moz-txt-link-freetext" href="http://ns3.123.co.nz/mailman/listinfo/delphi">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="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a>
<a class="moz-txt-link-freetext" href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a>
</pre>
</blockquote>
</body>
</html>