Skip to content

Commit 0111c50

Browse files
authored
Add Content-Type JSON to make the list of files available via storage (nedpals#24)
I noticed that the list of files method was not usable due to the missing Content-Type JSON. This is an easy fix for this issue.
1 parent e6854be commit 0111c50

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

storage.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ func (f *file) List(queryPath string, options FileSearchOptions) []FileObject {
448448

449449
reqURL := fmt.Sprintf("%s/%s/object/list/%s", f.storage.client.BaseURL, StorageEndpoint, f.BucketId)
450450
req, err := http.NewRequest(http.MethodPost, reqURL, bytes.NewBuffer(_json))
451+
req.Header.Set("Content-Type", "application/json")
451452
if err != nil {
452453
panic(err)
453454
}

0 commit comments

Comments
 (0)