Closed Vssblt closed 2 years ago
Just tested with git master and a 280MB file. With the default settings, it is rejected. Starting my server with:
xpra start --start=xterm -d file --file-size-limit=500M
Then the client with:
xpra attach --file-size-limit=500M
The transfer succeeds.
Trying with the html5 client: the default limit is 10MB there. How did you change that? What else did you modify?
Bumping this value to 500 helps, but then we hit a different issue:
2021-12-01 12:20:29,668 error processing control command 'send-file'
Traceback (most recent call last):
File "/usr/lib64/python3.10/site-packages/xpra/server/server_core.py", line 712, in process_control_command
v = command.run(*args[1:])
File "/usr/lib64/python3.10/site-packages/xpra/server/control_command.py", line 68, in run
return super().run(*args)
File "/usr/lib64/python3.10/site-packages/xpra/server/control_command.py", line 32, in run
return self.do_run(*args)
File "/usr/lib64/python3.10/site-packages/xpra/server/mixins/server_base_controlcommands.py", line 295, in control_command_send_file
return self.do_control_file_command("send file", client_uuids, filename, "file_transfer", (False, openit))
File "/usr/lib64/python3.10/site-packages/xpra/server/mixins/server_base_controlcommands.py", line 351, in do_control_file_command
ss.send_file(filename, "", data, file_size, *send_file_args)
File "/usr/lib64/python3.10/site-packages/xpra/net/file_transfer.py", line 724, in send_file
self.do_send_file(filename, mimetype, data, filesize, printit, openit, options)
File "/usr/lib64/python3.10/site-packages/xpra/net/file_transfer.py", line 885, in do_send_file
cdata = self.compressed_wrapper("file-data", data)
File "/usr/lib64/python3.10/site-packages/xpra/server/source/client_connection.py", line 147, in compressed_wrapper
return compressed_wrapper(datatype, data, can_inline=False, **kw)
File "/usr/lib64/python3.10/site-packages/xpra/net/compression.py", line 196, in compressed_wrapper
raise Exception("uncompressed data is too large: %iMB, limit is %iMB" % (sizemb, maxmb))
Exception: uncompressed data is too large: 269MB, limit is 256MB
That's because the lz4
encoder has a hard-coded limit and it should not be changed.
The html5 client needs to implement chunked file transfers instead: https://github.com/Xpra-org/xpra/issues/1026#issuecomment-765448842
Sorry, I forgot that I changed the maximum file transfer size of the HTML5 client and set a very large number. You reproduced the problem correctly. Does new version support for chunked file transfers? I used a very old xpra html5 version. v4.1
Does new version support for chunked file transfers?
No. This needs to be implemented.
The client can now send and receive chunked files of arbitrary size without causing connection issues.
Still TODO:
sha256
checksums:
x = forge.md.sha256.create()
x.update("abc")
x.digest().data
Now using StreamSaver.js!
As per the docs, we should probably register an onunload
and / or onbeforeunload
handlers.
What happened:
I use the html5 client and use commands to transfer files. xpra told me that the file transfer size limit was exceeded. The file transfer size limit configuration only working less than 256MB. How can I set the limit to be more than 256MB?
Information: