#1 2023-02-28 14:36:20

Registered: 2018-08-31
Posts: 11

Uploading Files to TWebSocketAsyncServer

Hello guys,

I was looking at the source code of Mormot2 to see if there's any way I can upload a file to TWebSocketAsyncServer, which is based on THttpAsyncServer.

But with no luck.

So is there any way I can upload files to the Mormot2 HTTP server, and if mormot 2 HTTP servers support multipart file upload?

I'm looking to upload files of 1GB to 5GB in size.



#2 2023-02-28 15:35:15

From: Ukraine
Registered: 2012-03-24
Posts: 1,465

Re: Uploading Files to TWebSocketAsyncServer

In mORMot1 I upload such huge files by manually split it on chunks (in my case - in browser) and send chunks one-by-one to the server endpoint with chunk number in URL  htp://.../fileUpload?chunk=x&totalChunks=y
On the server side endpoint just append HTTP request body what contains chunk to the file.

The same can be used with mORMot2

Last edited by mpv (2023-02-28 15:35:54)


Board footer

Powered by FluxBB