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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user