枫
枫
Unregistered / Unconfirmed
GUEST, unregistred user!
我用以下代码,怎么也返回不了上传的内容(我想把内容保存在一个BUFFER里):
procedure TWebModule1.WebModule1uploadAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var
Pbufferchar;
begin
getmem(pbuffer,request.ContentLength);
request.ReadClient(Pbuffer^,request.ContentLength);
response.Content:=pbuffer^;
freemem(pbuffer);
handled:=true;
end;
但我这样做却可以返回内容,不过好像有限制,超过50K就会丢数据
procedure TWebModule1.WebModule1uploadAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
begin
response.Content:=request.content;
end;
请大家帮我看看,谢谢了!
procedure TWebModule1.WebModule1uploadAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var
Pbufferchar;
begin
getmem(pbuffer,request.ContentLength);
request.ReadClient(Pbuffer^,request.ContentLength);
response.Content:=pbuffer^;
freemem(pbuffer);
handled:=true;
end;
但我这样做却可以返回内容,不过好像有限制,超过50K就会丢数据
procedure TWebModule1.WebModule1uploadAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
begin
response.Content:=request.content;
end;
请大家帮我看看,谢谢了!