summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.go b/main.go
index 19e557e..89834dd 100644
--- a/main.go
+++ b/main.go
@@ -179,7 +179,7 @@ func (s *Server) formPost(w http.ResponseWriter, r *http.Request) {
textName, err := s.postText(r)
if err != nil {
log.Print("Error text upload: ", err)
- } else {
+ } else if textName != "" {
log.Printf("Created posting: %s", textName)
textLink = fmt.Sprintf("%s/%s", s.host, textName)
}
@@ -187,7 +187,7 @@ func (s *Server) formPost(w http.ResponseWriter, r *http.Request) {
fileName, err := s.postFile(r)
if err != nil {
log.Print("Error file upload: ", err)
- } else {
+ } else if fileName != "" {
log.Printf("Created posting: %s", fileName)
fileLink = fmt.Sprintf("%s/%s", s.host, fileName)
}