#1 2016-11-16 18:47:44

Stemon63
Member
Registered: 2016-10-24
Posts: 50

HTTP or C/S file server

Hi,
what's the best and fast way for use mORMot as a remote HTTP File server and C/S file server?
Users must upload/dowload PDF files, using Delphi clients;
I like Restful approach, but I need to use chunks (and compression)...

Any example?

Thanks in advance!
Stefano

Offline

#2 2016-11-16 21:52:21

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,567
Website

Re: HTTP or C/S file server

See here in documentation
Chunks is supported out of the box

Offline

#3 2016-11-17 17:47:45

Stemon63
Member
Registered: 2016-10-24
Posts: 50

Re: HTTP or C/S file server

Hi Thanks,
but how to use ondownload features (or onprogress)  for show a progressbar on client, if I use TSQLRestClient and a remote GETfile service?
How use the  TWinHttpAPI events using TSQLRestClient ?
(I am new to mormot, a fantastic product)
Thanks in advance!
Stefano

Offline

#4 2016-11-21 18:46:54

Stemon63
Member
Registered: 2016-10-24
Posts: 50

Re: HTTP or C/S file server

Hi Mpv :-)
Thanks a lot...
I have solved my onDownload/onProgress need; In effect using http.sys server is the best... My need is to use chunks for a very intensive file server, and only with chunks I can manage a lot of request without out of memory, or out of resources;
But... how I can use also chunks in file uploads from Delphi clients?
Thanks in advance!
Stefano

Offline

#5 2016-11-21 20:50:57

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,567
Website

Re: HTTP or C/S file server

Only manually. Divide a file into part on client side and send a chunks. On the server side append a file. If client upload synchronously by sending each chunk only after receiving a answer from server about success upload previous chunk this is simple task. Don't forget what server can receive chunks in different threads, so close the file handle after each chunk append

Last edited by mpv (2016-11-21 20:51:50)

Offline

Board footer

Powered by FluxBB