Skip to content

Commit c8768d6

Browse files
committed
Fix Wording errors
1 parent a5e22fd commit c8768d6

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

upload.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ import (
1414
"go.uber.org/zap"
1515
)
1616

17+
const (
18+
Version = "0.2"
19+
)
20+
1721
func init() {
1822
caddy.RegisterModule(Upload{})
1923
httpcaddyfile.RegisterHandlerDirective("upload", parseCaddyfile)
@@ -54,8 +58,8 @@ func (u *Upload) Provision(ctx caddy.Context) error {
5458

5559
if u.DestDir == "" {
5660
u.logger.Error("Provision",
57-
zap.String("msg", "no Destinaton Directory specified (dest_dir)"))
58-
return fmt.Errorf("no Destinaton Directory specified (dest_dir)")
61+
zap.String("msg", "no Destination Directory specified (dest_dir)"))
62+
return fmt.Errorf("no Destination Directory specified (dest_dir)")
5963
}
6064

6165
mdall_err := os.MkdirAll(u.DestDir, 0755)
@@ -68,7 +72,7 @@ func (u *Upload) Provision(ctx caddy.Context) error {
6872

6973
if u.ResponseTemplate == "" {
7074
u.logger.Warn("Provision",
71-
zap.String("msg", "no ResponseTemplate specified (response_template), using the defualt one"),
75+
zap.String("msg", "no ResponseTemplate specified (response_template), using the default one"),
7276
)
7377
u.ResponseTemplate = "upload-resp-template.txt"
7478
}
@@ -164,7 +168,7 @@ func (u Upload) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp
164168
// write this byte array to our temporary file
165169
tempFile.Write(fileBytes)
166170

167-
u.logger.Info("Successfull Upload Info",
171+
u.logger.Info("Successful Upload Info",
168172
zap.String("Request uuid", requuid),
169173
zap.String("Uploaded File", handler.Filename),
170174
zap.Int64("File Size", handler.Size),
@@ -179,7 +183,7 @@ func (u Upload) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp
179183
}
180184

181185
if u.NotifyURL != "" {
182-
errNotify := u.SendNotify()
186+
errNotify := u.SendNotify(requuid)
183187

184188
if errNotify != nil {
185189
u.logger.Error("Notify Error",

0 commit comments

Comments
 (0)