Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

s3 partial get #235

Open
anacrolix opened this issue Feb 27, 2015 · 3 comments
Open

s3 partial get #235

anacrolix opened this issue Feb 27, 2015 · 3 comments

Comments

@anacrolix
Copy link

S3 purported supports Range requests, but there's no way to specify these in Bucket.Get and friends. Perhaps a GetHeader method or similar is required?

@frodopwns
Copy link

Does this method do what you want? https://godoc.org/github.com/mitchellh/goamz/s3#Bucket.Head

@anacrolix
Copy link
Author

Nah, HEAD requests are something else altogether, but thanks.

@skiz
Copy link

skiz commented Jul 25, 2017

I'm looking for the same thing. Unfortunately this function doesn't allow adding path or header params, and getResponseParams is a private method.

func (b *Bucket) GetResponse(path string) (*http.Response, error) {
	return b.getResponseParams(path, nil)
}

To achieve this, we need to be able to set custom headers on GET requests.
""The S3 APIs support the HTTP Range: header (see RFC 2616), which take a byte range argument. Just add a Range: bytes=0-NN header to your S3 request""

To add this functionality along with other custom functionality, adding GetReaderHeader which is similar to PutReaderHeader should solve this issue and be flexible enough for users to provide whatever headers they want.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants