首页 > Windows开发 > 详细

Delphi - IndyHttpServer接收上传文件

时间:2021-02-19 13:19:40      阅读:154      评论:0      收藏:0      [点我收藏+]
procedure TForm1.IdHTTPServerCommandGet(AContext: TIdContext; ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo);
var
  FileStream: TFileStream;
begin
  if ARequestInfo.PostStream <> nil then
  begin
    ARequestInfo.PostStream.Position := 0;
    FileStream := TFileStream.Create(‘1.jpg‘, fmCreate);
    FileStream.CopyFrom(ARequestInfo.PostStream, ARequestInfo.PostStream.Size); { Copy 流 }
    FileStream.Free;
  end;
end;

参考:

https://blog.csdn.net/zjm12343/article/details/89667560

Delphi - IndyHttpServer接收上传文件

原文:https://www.cnblogs.com/sunylat/p/14415103.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!