mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-23 04:03:35 +08:00
add mime, use simple insert and update filer store API
1. add mime type to file in filer 2. purge old chunks if overwrite during insert
This commit is contained in:
@@ -17,6 +17,7 @@ func (entry *Entry) EncodeAttributesAndChunks() ([]byte, error) {
|
||||
FileMode: uint32(entry.Attr.Mode),
|
||||
Uid: entry.Uid,
|
||||
Gid: entry.Gid,
|
||||
Mime: entry.Mime,
|
||||
},
|
||||
Chunks: entry.Chunks,
|
||||
}
|
||||
@@ -36,6 +37,7 @@ func (entry *Entry) DecodeAttributesAndChunks(blob []byte) error {
|
||||
entry.Attr.Mode = os.FileMode(message.Attributes.FileMode)
|
||||
entry.Attr.Uid = message.Attributes.Uid
|
||||
entry.Attr.Gid = message.Attributes.Gid
|
||||
entry.Attr.Mime = message.Attributes.Mime
|
||||
|
||||
entry.Chunks = message.Chunks
|
||||
|
||||
|
Reference in New Issue
Block a user