pico
created pr with
66.1
changed pr name to
chore(pobj.fs): feature parity with minio
added 66.2
1: a3f9ef2 = 1: a3f9ef2 chore: rm UserMetadata
2: ccd89b0 = 2: ccd89b0 refactor(shared): mime type pkg
3: 8621e35 = 3: 8621e35 chore(pobj.fs): provide metadata
-: ------- > 4: 831b150 chore(storage.fs): add tests
cmds
checkout latest patchset:
ssh pr.pico.sh print 66 | git am -3checkout any patchset in a patch request:
ssh pr.pico.sh print 66.[rev] | git am -3add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 66
Patchset
66.2
chore(pobj.fs): provide metadata
Eric Bower
2025-04-18T17:15:37Zfix(pobj.fs): attempt to delete empty folder
Semantic diff summary
0 added,
5 modified,
0 signature changed,
0 removed
across 1 analyzed file
+8
-1
pkg/pobj/storage/fs.go
#
| ... | ... | @@ -96,7 +98,7 @@ func (s *StorageFS) DeleteBucket(bucket Bucket) error { | |
| 96 | 98 | func (s *StorageFS) GetObject(bucket Bucket, fpath string) (utils.ReadAndReaderAtCloser, *ObjectInfo, error) { | |
| 97 | 99 | objInfo := &ObjectInfo{ | |
| 98 | 100 | LastModified: time.Time{}, | |
| 99 | - | Metadata: nil, | |
| 101 | + | Metadata: make(http.Header), | |
| 100 | 102 | } | |
| 101 | 103 | ||
| 102 | 104 | dat, err := os.Open(filepath.Join(bucket.Path, fpath)) |
| ... | ... | @@ -111,6 +113,7 @@ func (s *StorageFS) GetObject(bucket Bucket, fpath string) (utils.ReadAndReaderA | |
| 111 | 113 | ||
| 112 | 114 | objInfo.Size = info.Size() | |
| 113 | 115 | objInfo.LastModified = info.ModTime() | |
| 116 | + | objInfo.Metadata.Set("content-type", mime.GetMimeType(fpath)) | |
| 114 | 117 | return dat, objInfo, nil | |
| 115 | 118 | } | |
| 116 | 119 |