Skip to content

4.0.0

Compare
Choose a tag to compare
@arichika arichika released this 22 Apr 10:44
· 2 commits to master since this release
4833b8d

features

  • Property SaveOnServerPath is discontinued.
  • Support new delegate. TryCustomizeAsync()
    • If you want to customize the generated binary file before OnBuildFileSuccess(), use this.
    • Please return true to continue processing, false to drop with error.
        public ActionResult TestInlie()
        {
            return new ActionAsPdf("Index")
            {
                ContentDisposition = ContentDisposition.Inline,
                TryCustomizeAsync = async (stream, context, fineName) =>
                {
                    // some code done.
                    return true;

                    // e.g.
                    var customizeStream = new MemoryStream();
                    await stream.CopyToAsync(customizeStream);

                    // ...
                    stream.SetLength(0);
                    await customizeStream.CopyToAsync(stream);

                    return true;
                },
            };
        }