billyChou Posted January 29, 2020 Share Posted January 29, 2020 Hi File Upload max size is 419mb. in x86 Server max size is 4GB. need realtime save upload buffer stream in temp file. Thanks. Quote Link to comment Share on other sites More sharing options...
Tokay Posted January 29, 2020 Share Posted January 29, 2020 You can use this approach: http://jira.fmsoft.net/servicedesk/customer/portal/4/FSD-672 procedure TWebDataModule.IdHTTPServer1CreatePostStream(AContext: TIdContext; AHeaders: TIdHeaderList; var VPostStream: TStream); var Length: int64; begin Length := StrToInt64Def(AHeaders.Values['Content-Length'], 0); if Length > 20000000 then VPostStream := TFileStream.Create(GetTempFile, fmCreate) else VPostStream := TMemoryStream.Create; end; And after upload is nedded to free stream: if ARequestInfo.PostStream is TFileStream then begin FileName := (ARequestInfo.PostStream as TFileStream).FileName; ARequestInfo.PostStream.Free; ARequestInfo.PostStream := nil; end; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.