Показать сообщение отдельно
  #14  
Старый 30.11.2012, 21:58
Snake22 Snake22 вне форума
Активный
 
Регистрация: 20.02.2011
Сообщения: 374
Репутация: 744
По умолчанию

нет.там есть всякие значения.а вот
AResponseInfo.ContentStream равен nil
вот код если что
Код:
procedure TForm1.IdHTTPServer1CommandGet(AContext: TIdContext;
  ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo);
var
FileStrm: TRangeFileStream;
LSize, LNumRead: Integer;
LBuf: array[0..1023] of Byte;

begin
//...
FileStrm := TRangeFileStream.Create(Edit1.Text,ARequestInfo.ContentRangeStart, ARequestInfo.ContentRangeEnd);

LSize := FileStrm.Size;

AResponseInfo.ContentType :='video/x-msvideo	avi';// для теста пока взял большой файл, фильмец
AResponseInfo.ContentLength := LSize;
AResponseInfo.ContentRangeStart := FileStrm.RangeStart;
AResponseInfo.ContentRangeEnd := FileStrm.RangeEnd;
AResponseInfo.WriteHeader;

FileStrm.Position := 0;

AResponseInfo.ContentStream:=FileStrm;


end;
Ответить с цитированием