Open kgseong opened 6 years ago
public abstract class ELFinderContentCommandStreamResult<TResult> : FileStreamResult ... public override void ExecuteResult(ControllerContext context) { ... WriteFile(response); }
=>
public override void ExecuteResult(ControllerContext context) { ... int chunkSize = 8192; byte[] buffer = new byte[chunkSize]; int offset = 0; int read = 0; var fs = base.FileStream; while ((read = fs.Read(buffer, offset, chunkSize)) > 0) { if (!response.IsClientConnected) break; response.OutputStream.Write(buffer, 0, read); response.Flush(); } }
=>