filer: fix uploaded chunked file size reporting bug.
This commit is contained in:
@@ -125,12 +125,13 @@ func (fs *FilerServer) doAutoChunk(ctx context.Context, w http.ResponseWriter, r
|
|||||||
|
|
||||||
glog.V(4).Infof("uploaded %s chunk %d to %s [%d,%d) of %d", fileName, len(fileChunks), fileId, chunkOffset, chunkOffset+int64(uploadedSize), contentLength)
|
glog.V(4).Infof("uploaded %s chunk %d to %s [%d,%d) of %d", fileName, len(fileChunks), fileId, chunkOffset, chunkOffset+int64(uploadedSize), contentLength)
|
||||||
|
|
||||||
|
// reset variables for the next chunk
|
||||||
|
chunkOffset = chunkOffset + int64(uploadedSize)
|
||||||
|
|
||||||
// if last chunk was not at full chunk size, but already exhausted the reader
|
// if last chunk was not at full chunk size, but already exhausted the reader
|
||||||
if uploadedSize < int64(chunkSize) {
|
if uploadedSize < int64(chunkSize) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
// reset variables for the next chunk
|
|
||||||
chunkOffset = chunkOffset + int64(uploadedSize)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
path := r.URL.Path
|
path := r.URL.Path
|
||||||
|
|||||||
Reference in New Issue
Block a user