diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-08-28 19:42:40 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-08-28 19:42:40 -0700 |
| commit | b7a654a31855f994e05cefb97b1e7cdf2b2a5a00 (patch) | |
| tree | 0e48b0c45855937e334d747d2af87ef746305b24 | |
| parent | 707192f966843db1c41420bdf7fa6d316d4431b3 (diff) | |
| download | seaweedfs-b7a654a31855f994e05cefb97b1e7cdf2b2a5a00.tar.xz seaweedfs-b7a654a31855f994e05cefb97b1e7cdf2b2a5a00.zip | |
file mime avoid saving application/octet-stream
| -rw-r--r-- | weed/filer2/filerstore.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/filer2/filerstore.go b/weed/filer2/filerstore.go index 7c518c6fe..ab1d0e659 100644 --- a/weed/filer2/filerstore.go +++ b/weed/filer2/filerstore.go @@ -63,6 +63,9 @@ func (fsw *FilerStoreWrapper) InsertEntry(ctx context.Context, entry *Entry) err }() filer_pb.BeforeEntrySerialization(entry.Chunks) + if entry.Mime == "application/octet-stream" { + entry.Mime = "" + } return fsw.ActualStore.InsertEntry(ctx, entry) } @@ -74,6 +77,9 @@ func (fsw *FilerStoreWrapper) UpdateEntry(ctx context.Context, entry *Entry) err }() filer_pb.BeforeEntrySerialization(entry.Chunks) + if entry.Mime == "application/octet-stream" { + entry.Mime = "" + } return fsw.ActualStore.UpdateEntry(ctx, entry) } |
