/*
uploader -- simplest form file uploader
-Copyright (C) 2018-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2018-2023 Sergey Matveev <stargrave@stargrave.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
"fmt"
"html/template"
"io"
- "io/ioutil"
"log"
"mime"
"net"
var commentLines []string
p, err = mr.NextPart()
if err == nil && p.FormName() == CommentFieldName {
- comment, err := ioutil.ReadAll(p)
+ comment, err := io.ReadAll(p)
if err == nil && len(comment) > 0 {
commentLines = strings.Split(string(comment), "\n")
wr.WriteFieldMultiline("Comment", commentLines)
}
}
- ioutil.WriteFile(tai+".rec", rec.Bytes(), os.FileMode(0666))
+ os.WriteFile(tai+".rec", rec.Bytes(), os.FileMode(0666))
if *NotifyToAddr == "" {
return
}