filer: set file size, streaming chunk file uploading

fix https://github.com/chrislusf/seaweedfs/issues/1193
This commit is contained in:
Chris Lu
2020-02-03 17:04:06 -08:00
parent 40ae533fa3
commit 382ff218d3
2 changed files with 43 additions and 62 deletions

View File

@@ -32,7 +32,7 @@ var (
type FilerPostResult struct {
Name string `json:"name,omitempty"`
Size uint32 `json:"size,omitempty"`
Size int64 `json:"size,omitempty"`
Error string `json:"error,omitempty"`
Fid string `json:"fid,omitempty"`
Url string `json:"url,omitempty"`
@@ -130,7 +130,7 @@ func (fs *FilerServer) PostHandler(w http.ResponseWriter, r *http.Request) {
// send back post result
reply := FilerPostResult{
Name: ret.Name,
Size: ret.Size,
Size: int64(ret.Size),
Error: ret.Error,
Fid: fileId,
Url: urlLocation,