Beispiel #1
0
func (c *CacheContext) ReadModified(s store.ImageStore) (io.ReadCloser, error) {
	data, err := s.GetReader(c.Bucket, c.CacheKey())
	if err != nil {
		log.Printf("s3 download: %s", err.Error())
		return nil, err
	}

	return data, err
}
Beispiel #2
0
func (c *CacheContext) ReadOriginal(s store.ImageStore) (io.ReadCloser, error) {
	r, err := s.GetReader(c.Bucket, c.ImageId)
	if err != nil {
		log.Printf("s3 download: %s", err.Error())
		return nil, err
	}

	return r, err
}