|
|
|
@ -95,6 +95,10 @@ func handleImport(app *App, u *User, w http.ResponseWriter, r *http.Request) err |
|
|
|
|
// not a real error so don't log
|
|
|
|
|
_ = addSessionFlash(app, w, r, fmt.Sprintf("%s was empty, import skipped", formFile.Filename), nil) |
|
|
|
|
continue |
|
|
|
|
} else if err == wfimport.ErrInvalidContentType { |
|
|
|
|
// same as above
|
|
|
|
|
_ = addSessionFlash(app, w, r, fmt.Sprintf("%s is not a supported post file", formFile.Filename), nil) |
|
|
|
|
continue |
|
|
|
|
} else if err != nil { |
|
|
|
|
fileErrs = append(fileErrs, fmt.Errorf("failed to read copy of %s", formFile.Filename)) |
|
|
|
|
log.Error("import textfile: file to post: %v", err) |
|
|
|
|