Added fix to retrieve correct s3 urls (#2465)
* Added fix to retrieve correct s3 urls * Fixes to S3 url * Squashing commits * Fixing if conditions for storagetype in geturl
This commit is contained in:
@@ -20,7 +20,6 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"mime/multipart"
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -183,18 +182,6 @@ func (client *StowClient) removeFileByID(itemID string) error {
|
||||
return client.container.RemoveItem(itemID)
|
||||
}
|
||||
|
||||
func (client *StowClient) getURL(itemID string) (*url.URL, error) {
|
||||
item, err := client.container.Item(itemID)
|
||||
if err != nil {
|
||||
if err == stow.ErrNotFound {
|
||||
return nil, ErrNotFound
|
||||
} else {
|
||||
return nil, ErrRetrievingItem
|
||||
}
|
||||
}
|
||||
return item.URL(), nil
|
||||
}
|
||||
|
||||
func (client *StowClient) getFileSize(itemID string) (int64, error) {
|
||||
item, err := client.container.Item(itemID)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user