peterbourgon / diskv

A disk-backed key-value store.
http://godoc.org/github.com/peterbourgon/diskv
MIT License
1.4k stars 102 forks source link

http file stream #56

Closed idefixcert closed 4 years ago

idefixcert commented 4 years ago

Hi all,

I just wanna ask how you would serve a file saved in diskv via http. I have seen the http.ServeContent, but this needs an io.ReadSeeker. For http.ServeContent, we need the file. would you do a io.Copy?

Regards Chris

peterbourgon commented 4 years ago

Yes, I'd probably io.Copy from the io.Reader returned by diskv to the http.ResponseWriter, unless you had more specific requirements.