working commit
This commit is contained in:
+6
-6
@@ -53,12 +53,12 @@ func (cli *Client) FileInfo(ctx context.Context, fileuri string) (bool, *descr.F
|
||||
if resp.StatusCode == http.StatusOK {
|
||||
file.Collection = resp.Header.Get("Content-Collection")
|
||||
file.Name = resp.Header.Get("Content-Name")
|
||||
contentSize := resp.Header.Get("Content-Size")
|
||||
size, err := strconv.ParseInt(contentSize, 10, 64)
|
||||
if err != nil {
|
||||
return exists, file, err
|
||||
}
|
||||
file.Size = size
|
||||
//contentSize := resp.Header.Get("Content-Size")
|
||||
//size, err := strconv.ParseInt(contentSize, 10, 64)
|
||||
//if err != nil {
|
||||
//return exists, file, err
|
||||
//}
|
||||
//file.Size = size
|
||||
file.Type = resp.Header.Get("Content-Type")
|
||||
file.Checksum = resp.Header.Get("Content-Digest")
|
||||
exists = true
|
||||
|
||||
Reference in New Issue
Block a user