Skip to content

Commit

Permalink
Merge pull request #61 from upyun/feature/content-type
Browse files Browse the repository at this point in the history
list add content-type info
  • Loading branch information
huangnauh authored Jul 29, 2022
2 parents e50b1c9 + e298a85 commit 5319c82
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions upyun/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,11 @@ func parseBodyToFileInfos(b []byte) (iter string, fInfos []*FileInfo, err error)

for i, f := range files.Files {
fInfos[i] = &FileInfo{
Name: f.Name,
IsDir: f.ContentType == "folder",
Size: f.Length,
Time: time.Unix(f.LastModified, 0),
Name: f.Name,
IsDir: f.ContentType == "folder",
ContentType: f.ContentType,
Size: f.Length,
Time: time.Unix(f.LastModified, 0),
}
}
return
Expand Down

0 comments on commit 5319c82

Please sign in to comment.