fix: dont try to stream if we have an error
This commit is contained in:
parent
9b17557d14
commit
b21a425e24
|
@ -155,7 +155,9 @@ func (f *FilesService) GetDownload() {
|
|||
|
||||
ctx.Header("Transfer-Encoding", "chunked")
|
||||
|
||||
internalError(ctx, err)
|
||||
if internalError(ctx, err) {
|
||||
return
|
||||
}
|
||||
|
||||
err = ctx.StreamWriter(func(w io.Writer) error {
|
||||
_, err = io.Copy(w, fetch.RawBody())
|
||||
|
|
Loading…
Reference in New Issue