Z
zlfsa
Unregistered / Unconfirmed
GUEST, unregistred user!
源码如下,请高手赐教
procedure TForm1.Button3Click(Sender: TObject);
var res : String;
mps : TIdMultiPartFormDataStream;
begin
inherited;
try
mps := TIdMultiPartFormDataStream.Create;
//mps.AddFormField('Description', edtDescription.Text);
mps.AddFile(edtFile.Name, edtFile.Text, edtMIMEType.Text);
mps.Position:=0;
res:=IdHTTP1.Post('http://xxxxx/xx.asp',mps);
//xxxxx/xx.asp为我的asp文件,通过htm网页调用,上传文件成功
finally
mps.Free;
end;
end;
//执行报错:Http/1.1 500 Internal server error
procedure TForm1.Button3Click(Sender: TObject);
var res : String;
mps : TIdMultiPartFormDataStream;
begin
inherited;
try
mps := TIdMultiPartFormDataStream.Create;
//mps.AddFormField('Description', edtDescription.Text);
mps.AddFile(edtFile.Name, edtFile.Text, edtMIMEType.Text);
mps.Position:=0;
res:=IdHTTP1.Post('http://xxxxx/xx.asp',mps);
//xxxxx/xx.asp为我的asp文件,通过htm网页调用,上传文件成功
finally
mps.Free;
end;
end;
//执行报错:Http/1.1 500 Internal server error