nc_py_api icon indicating copy to clipboard operation
nc_py_api copied to clipboard

`files.upload_stream` returns 408 Request Timeout error

Open edward-ly opened this issue 3 months ago • 2 comments

Describe the bug

Since version 0.21.0, the files.upload_stream function always raises an exception with an error message like this: [408] Request Timeout <upload_stream(v=True): user=admin, path=Media/example1.gif, cur_size=331398>

If version 0.20.2 or below is installed, the upload works just fine. I suspect, then, it has something to do with the migration to the niquests library, but I'm not sure why.

Steps/Code to Reproduce

You can follow the ExApp tutorial as an example. In requirements.txt, change the first line to nc_py_api[app]==0.21.1 to reproduce the error.

Expected Results

The upload succeeds.

Actual Results

The upload fails, with a server log entry created containing the error message described above.

Setup configuration

nc_py_api >= 0.21.0 nextcloud = 33.0.0

edward-ly avatar Sep 24 '25 22:09 edward-ly

I can't reproduce this with standalone call to:

nc.files.upload_stream("10mb_video.mp4", "10mb_video.mp4")
nc.files.upload_stream("100mb_video.mp4", "100mb_video.mp4")

need more information to be able to reproduce.

by the way, does you the icon display for you?

there is issue reported in AppAPI but I can't find time to check it: https://github.com/nextcloud/app_api/issues/630

bigcat88 avatar Sep 25 '25 06:09 bigcat88

Oh yeah, I forgot to mention this was seen in GitHub Codespaces (follow the Codespaces version of the tutorial), so maybe it's that?

I saw the icon on the first run, but whenever I made code changes and restarted the app, it disappeared. I'm not sure why either.

edward-ly avatar Sep 25 '25 14:09 edward-ly