mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-19 04:24:28 +02:00
adding modified time to file chunk
This commit is contained in:
1 parent
6bf31467c7
commit
e31c514b00
5 files changed
+64
-49
No files matched your search
@@ -24,6 +24,7 @@ import (
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"time"
|
||||
)
|
||||
|
||||
type FilerPostResult struct {
|
||||
@@ -335,6 +336,7 @@ func (fs *FilerServer) PostHandler(w http.ResponseWriter, r *http.Request) {
|
||||
Chunks: []*filer_pb.FileChunk{{
|
||||
FileId: fileId,
|
||||
Size: uint64(r.ContentLength),
|
||||
Mtime: time.Now().UnixNano(),
|
||||
}},
|
||||
}
|
||||
if db_err := fs.filer.CreateEntry(entry); db_err != nil {
|
||||
@@ -460,6 +462,7 @@ func (fs *FilerServer) doAutoChunk(w http.ResponseWriter, r *http.Request, conte
|
||||
FileId: fileId,
|
||||
Offset: chunkOffset,
|
||||
Size: uint64(chunkBufOffset),
|
||||
Mtime: time.Now().UnixNano(),
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user