forked from forgejo/forgejo
Make repository response support HTTP range request (#24592)
Replace #20480 Replace #18448 Close #16414
This commit is contained in:
parent
c090f87a8d
commit
023a048f52
12 changed files with 434 additions and 212 deletions
|
@ -153,10 +153,7 @@ func ServeAttachment(ctx *context.Context, uuid string) {
|
|||
}
|
||||
defer fr.Close()
|
||||
|
||||
if err = common.ServeData(ctx, attach.Name, attach.Size, fr); err != nil {
|
||||
ctx.ServerError("ServeData", err)
|
||||
return
|
||||
}
|
||||
common.ServeContentByReadSeeker(ctx, attach.Name, attach.CreatedUnix.AsTime(), fr)
|
||||
}
|
||||
|
||||
// GetAttachment serve attachments
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue