Open danielemoroni opened 3 years ago
~It's OK from me.~
The response is ok, but content is empty. It's at the end of the first line in your screenshot: "content": ""
For smaller files that field is populated with the file content (as a base64 string).
Incidentally the limit seems to be around 10MB, as I can get a 9.6MB file ok.
I think this is because to convert it into json the whole file is first loaed into mem and then encoded ... to solve this It looks like we have to stream encode it ...?
[x]
):Description
I uploaded a 14MB file to a repository, and tried the API GET /repos/{owner}/{repo}/contents/{filepath}. Example in try.gitea.io swagger: curl -X GET "https://try.gitea.io/api/v1/repos/danielemoroni/bigfile_test/contents/bigfile.dat" -H "accept: application/json"
I get a response 200 but the content is empty. It's fine if I use the raw api instead, GET /repos/{owner}/{repo}/raw/{filepath}.
Is this a known limit in gitea? I couldn't find any documentation or issue about it.
Screenshots