How do you get cgi uploads to work??

Im using TModuledCGIApplication

procedure TCGIDatamodule1.DataModuleCGIRequest(Sender: TObject);
begin
  // upload handling
  writeln('<div>filenamevar:
'+application.requestvariables['file']+'</div>');  // works when get but
post is just blank
  writeln('<div>filenamefile:
'+application.UploadedFileName('file')+'<div>');  // doesn't work with get
or post, just comes out blank

// upload html
  writeln('<form action="'+extractfilename(application.Params[0])+'"
method="post">');
  writeln('Upload File: <input type="file" name="file" /> <input
type="submit" value="Submit"/>');
  writeln('</form>');
end;


TIA
- V
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to