Browse Source

Merge pull request #1720 from PeterCxy/patch-put-respect-mime

filer: respect Content-Type on PUT
pull/1723/head
Chris Lu 4 years ago
committed by GitHub
parent
commit
8529d56b59
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      weed/server/filer_server_handlers_write_autochunk.go

5
weed/server/filer_server_handlers_write_autochunk.go

@ -111,7 +111,10 @@ func (fs *FilerServer) doPostAutoChunk(ctx context.Context, w http.ResponseWrite
func (fs *FilerServer) doPutAutoChunk(ctx context.Context, w http.ResponseWriter, r *http.Request, chunkSize int32, so *operation.StorageOption) (filerResult *FilerPostResult, md5bytes []byte, replyerr error) {
fileName := ""
contentType := ""
contentType := r.Header.Get("Content-Type")
if contentType == "application/octet-stream" {
contentType = ""
}
fileChunks, md5Hash, chunkOffset, err, smallContent := fs.uploadReaderToChunks(w, r, r.Body, chunkSize, fileName, contentType, so)
if err != nil {

Loading…
Cancel
Save