1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

Migrate from pkg go.enmime to enmime

This commit is contained in:
James Hillyerd
2016-11-17 18:35:01 -08:00
parent 145e71dc43
commit 1906a147f0
7 changed files with 19 additions and 19 deletions

View File

@@ -337,7 +337,7 @@ func MailboxDownloadAttach(w http.ResponseWriter, req *http.Request, ctx *httpd.
w.Header().Set("Content-Type", "application/octet-stream")
w.Header().Set("Content-Disposition", "attachment")
if _, err := w.Write(part.Content()); err != nil {
if _, err := io.Copy(w, part); err != nil {
return err
}
return nil
@@ -387,7 +387,7 @@ func MailboxViewAttach(w http.ResponseWriter, req *http.Request, ctx *httpd.Cont
part := body.Attachments[num]
w.Header().Set("Content-Type", part.ContentType())
if _, err := w.Write(part.Content()); err != nil {
if _, err := io.Copy(w, part); err != nil {
return err
}
return nil