feat: show
This commit is contained in:
@ -78,7 +78,7 @@ func (c *Client) ListFile(ctx context.Context, bucket string, prefix string) ([]
|
||||
name := strings.TrimPrefix(*item.Prefix, prefix)
|
||||
return &ListFileRes{
|
||||
Name: name,
|
||||
Key: name,
|
||||
Key: *item.Prefix,
|
||||
Type: ListFileTypeDir,
|
||||
}, name != ""
|
||||
},
|
||||
@ -88,7 +88,7 @@ func (c *Client) ListFile(ctx context.Context, bucket string, prefix string) ([]
|
||||
output.Contents,
|
||||
func(item types.Object, index int) *ListFileRes {
|
||||
return &ListFileRes{
|
||||
Key: *item.Key,
|
||||
Key: strings.Clone(*item.Key),
|
||||
Name: strings.TrimPrefix(*item.Key, prefix),
|
||||
LastModified: *item.LastModified,
|
||||
Size: *item.Size,
|
||||
|
Reference in New Issue
Block a user