mirror of
https://github.com/go-gitea/gitea
synced 2024-12-23 00:54:28 +00:00
Fix incorrect rendering csv file when file size is larger than UI.CSV.MaxFileSize (#29653)
Fix #29506
This commit is contained in:
parent
f86e9a0367
commit
9dc8a6336e
@ -93,9 +93,11 @@ func (Renderer) Render(ctx *markup.RenderContext, input io.Reader, output io.Wri
|
|||||||
if _, err := tmpBlock.WriteString(html.EscapeString(string(rawBytes))); err != nil {
|
if _, err := tmpBlock.WriteString(html.EscapeString(string(rawBytes))); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
_, err = tmpBlock.WriteString("</pre>")
|
if _, err := tmpBlock.WriteString("</pre>"); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
return tmpBlock.Flush()
|
||||||
|
}
|
||||||
|
|
||||||
rd, err := csv.CreateReaderAndDetermineDelimiter(ctx, bytes.NewReader(rawBytes))
|
rd, err := csv.CreateReaderAndDetermineDelimiter(ctx, bytes.NewReader(rawBytes))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user