[Bug] When uploading normative routing files, the memory overhead is too large #2938
Labels
bug
It is confirmed a bug, but don't worry, we'll handle it.
help wanted
planned
This issue/proposal is planned into our next steps.
When standard routing is used, gf will read the entire body content first, and then do parameter binding. Therefore, when there is a file parameter in the canonical route, gf will first read the content of the file into memory. When there are multiple file upload requests at the same time, it is easy to blow up the system memory.
1. What version of
Go
and system type/arch are you using?go version go1.20 linux/amd64
2. What version of
GoFrame
are you using?v2.5.2
3. Can this issue be re-produced with the latest release?
yes
4. What did you do?
5. What did you expect to see?
When there are multiple upload requests at the same time, the memory overhead will not be too large.
6. What did you see instead?
Read the file data and write the data to the disk at the same time, instead of reading all the data and then writing it to the disk.
The text was updated successfully, but these errors were encountered: