Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

remove unused code

Chris Lu3afc2d2ce6f8
diff --git a/go/operation/upload_content.go b/go/operation/upload_content.go
index 27ebb0f5af..cae657b2ce 100644
--- a/go/operation/upload_content.go
+++ b/go/operation/upload_content.go
@@ -4,12 +4,10 @@ import (
"bytes"
"encoding/json"
"errors"
- "path/filepath"
_ "fmt"
"io"
"io/ioutil"
"log"
- "mime"
"mime/multipart"
"net/http"
)
@@ -31,8 +29,7 @@ func Upload(uploadUrl string, filename string, reader io.Reader) (*UploadResult,
log.Println("error copying data", err)
return nil, err
}
- content_type := mime.TypeByExtension(filepath.Ext(filename))
- content_type := body_writer.FormDataContentType()
+ content_type := body_writer.FormDataContentType()
if err = body_writer.Close(); err != nil {
log.Println("error closing body", err)
return nil, err