mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2026-02-03 14:13:26 +00:00
handle range with no limit
This commit is contained in:
@@ -86,7 +86,9 @@ func (s *StorjStorage) Get(ctx context.Context, token string, filename string, r
|
|||||||
options := uplink.DownloadOptions{}
|
options := uplink.DownloadOptions{}
|
||||||
if rng != nil {
|
if rng != nil {
|
||||||
options.Offset = int64(rng.Start)
|
options.Offset = int64(rng.Start)
|
||||||
options.Length = int64(rng.Limit)
|
if rng.Limit > 0 {
|
||||||
|
options.Length = int64(rng.Limit)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
download, err := s.project.DownloadObject(fpath.WithTempData(ctx, "", true), s.bucket.Name, key, &options)
|
download, err := s.project.DownloadObject(fpath.WithTempData(ctx, "", true), s.bucket.Name, key, &options)
|
||||||
|
|||||||
Reference in New Issue
Block a user