/// <summary> /// Perform cleanup/finalization steps on StreamPath /// </summary> /// <remarks> /// MemoryStream previously created by GetWriteStream should now be populated with data from source file, and /// can now be used to stream attachment to SMTP server /// </remarks> public override async Task FinalizeWrite(StreamPath streampath) { streampath.stream.Position = 0; // Rewind MemoryStream to start of data await smtp.SendEmail(messageSubject : streampath.path, messageBody : "Your file is attached", messageTo : config.location, attachment : streampath.stream, attachmentName : streampath.path); }
/// <summary> /// Perform cleanup/finalization steps on StreamPath (not required) /// </summary> public override async Task FinalizeWrite(StreamPath streampath) { }
public abstract Task FinalizeWrite(StreamPath streampath);