mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 17:50:58 +00:00
commit
10236b9f2d
@ -175,6 +175,7 @@ func (e *Email) AttachFile(args ...string) (a *Attachment, err error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
defer f.Close()
|
||||||
ct := mime.TypeByExtension(filepath.Ext(filename))
|
ct := mime.TypeByExtension(filepath.Ext(filename))
|
||||||
basename := path.Base(filename)
|
basename := path.Base(filename)
|
||||||
return e.Attach(f, basename, ct, id)
|
return e.Attach(f, basename, ct, id)
|
||||||
|
Loading…
Reference in New Issue
Block a user