Browse Source
Merge pull request #2740 from banjiaojuhao/filer-bugfix-handle_upload_interruption
[bugfix] filer: upload files error
pull/2741/head
Chris Lu
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
0 deletions
-
weed/server/filer_server_handlers_write_upload.go
|
|
@ -79,6 +79,7 @@ func (fs *FilerServer) uploadReaderToChunks(w http.ResponseWriter, r *http.Reque |
|
|
|
bufPool.Put(bytesBuffer) |
|
|
|
atomic.AddInt64(&bytesBufferCounter, -1) |
|
|
|
bytesBufferLimitCond.Signal() |
|
|
|
uploadErr = err |
|
|
|
break |
|
|
|
} |
|
|
|
if chunkOffset == 0 && !isAppend { |
|
|
@ -126,6 +127,7 @@ func (fs *FilerServer) uploadReaderToChunks(w http.ResponseWriter, r *http.Reque |
|
|
|
wg.Wait() |
|
|
|
|
|
|
|
if uploadErr != nil { |
|
|
|
fs.filer.DeleteChunks(fileChunks) |
|
|
|
return nil, md5Hash, 0, uploadErr, nil |
|
|
|
} |
|
|
|
|
|
|
|