feat: allow fetching arbitrary object puburls (#3043)
This fix should be backward-compatible, since strings do not need to be initialized by default, and JSON explicitly allows it to be omitted when empty.
This commit is contained in:
@@ -42,6 +42,7 @@ type contentMessage struct {
|
||||
Size int64 `json:"size"`
|
||||
Key string `json:"key"`
|
||||
ETag string `json:"etag"`
|
||||
URL string `json:"url,omitempty"`
|
||||
}
|
||||
|
||||
// String colorized string message.
|
||||
@@ -148,6 +149,9 @@ func doList(clnt Client, isRecursive, isIncomplete bool) error {
|
||||
contentURL = strings.TrimPrefix(contentURL, prefixPath)
|
||||
content.URL.Path = contentURL
|
||||
parsedContent := parseContent(content)
|
||||
// URL is empty by default
|
||||
// Set it to either relative dir (host) or public url (remote)
|
||||
parsedContent.URL = clnt.GetURL().String()
|
||||
// Print colorized or jsonized content info.
|
||||
printMsg(parsedContent)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user