summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorMarin Ivanov <[email protected]>2025-06-16 13:34:26 +0300
committerMarin Ivanov <[email protected]>2025-06-16 13:34:26 +0300
commit24661c38a32a6737390f45bbdeedeccf97c59460 (patch)
tree5c3c9855e4e632367ff4a85cf292b0b5670c68a6 /main.go
parent3cb88faf5d952596b1efa89833fe6e7415be0513 (diff)
fix indexPost
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.go b/main.go
index 63d7b4f..8ef838d 100644
--- a/main.go
+++ b/main.go
@@ -194,6 +194,8 @@ func (s *Server) indexPost(w http.ResponseWriter, r *http.Request) {
ext := ""
if mimeType == "" {
mimeType, ext, rd, _ = detectMimetype(r.Body)
+ } else {
+ rd = r.Body
}
f, name, err := s.createRandomFilename(ext)
if err != nil {