Skip to content
Snippets Groups Projects
Commit 51d0587f authored by Travis Ralston's avatar Travis Ralston
Browse files

Finish Range request handling

parent 687838af
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,5 @@ func Download(ctx rcontext.RequestContext, ds config.DatastoreConfig, dsFileName
return nil, errors.New("unknown datastore type - contact developer")
}
// TODO(TR-1): @@ Return seekable stream
return rsc, err
}
......@@ -74,7 +74,6 @@ func TryGetMedia(ctx rcontext.RequestContext, hash string) (io.Reader, error) {
var result *redis.StringCmd
// TODO(TR-1): @@ Return seekable stream
ctx.Log.Debugf("Getting whole cached object for %s", hash)
result = ring.Get(timeoutCtx, hash)
......@@ -88,7 +87,7 @@ func TryGetMedia(ctx rcontext.RequestContext, hash string) (io.Reader, error) {
}
metrics.CacheHits.With(prometheus.Labels{"cache": "media"}).Inc()
return bytes.NewBuffer(s), nil
return bytes.NewReader(s), nil
}
func DeleteMedia(ctx rcontext.RequestContext, hash string) error {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment