textileio / textile

Textile hub services and buckets lib
MIT License
227 stars 45 forks source link

gateway: use an io.Reader to serve Cid data #525

Closed jsign closed 3 years ago

jsign commented 3 years ago

Use an io.Reader instead of loading all the content in a slice, which can lead to high RAM usage and potential OOM crashes. The mime detection still works crafting a new reader to return the full output.