Omitted unused variable. Fixed copy-paste error with using uploaded template instead of nospace.
This commit is contained in:
parent
fe3883de83
commit
980dce8023
@ -73,7 +73,7 @@ func NewUploadHandlers(conf *configuration.Configuration, lErr, lUp, lDown *logg
|
|||||||
uploadDirSize: uploadDirSize}
|
uploadDirSize: uploadDirSize}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *UploadHandlers) AssetsFS() http.FileSystem {
|
func (*UploadHandlers) AssetsFS() http.FileSystem {
|
||||||
f, _ := fs.Sub(assetsDir, "web/assets")
|
f, _ := fs.Sub(assetsDir, "web/assets")
|
||||||
return http.FS(f)
|
return http.FS(f)
|
||||||
}
|
}
|
||||||
@ -131,7 +131,7 @@ func (h *UploadHandlers) Upload(w http.ResponseWriter, r *http.Request) {
|
|||||||
if leftSpace < fHandler.Size {
|
if leftSpace < fHandler.Size {
|
||||||
h.logErr.Println("not enough space left in storage, only", leftSpace>>20, "MiB left")
|
h.logErr.Println("not enough space left in storage, only", leftSpace>>20, "MiB left")
|
||||||
w.WriteHeader(http.StatusInternalServerError)
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
if err := compiledTemplates["uploaded"].Execute(w, &NotFoundData{
|
if err := compiledTemplates["nospace"].Execute(w, &NotFoundData{
|
||||||
MainSite: utils.MainSite(r.Host),
|
MainSite: utils.MainSite(r.Host),
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
w.WriteHeader(http.StatusInternalServerError)
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
|
Loading…
Reference in New Issue
Block a user