Can't retrieve TStreams bigger than around 260.000 bytes from a Datasnap Server

前端 未结 6 518
盖世英雄少女心
盖世英雄少女心 2020-12-11 06:05

I have a Delphi 10.1 Berlin Datasnap Server, that can\'t return Data packets (through a TStream) bigger than around 260.000 bytes.

I have programmed it following the

6条回答
  •  既然无缘
    2020-12-11 06:44

    A workaround: run a HTTP server which serves requests for the big files. The code generates and stores the file as shown in your question, and returns its URL to the client:

    https://example.com/ds/... -> for the DataSnap service
    
    https://example.com/files/... -> for big files
    

    If you already use Apache as reverse proxy, you can configure Apache to route HTTP GET requests to resources at /files/.

    For more control (authentication), you can run a HTTP server (Indy based) on a different port which serves the requests to these files. Apache may be configured to map HTTP requests to the correct destination, the client will only see one HTTP port.

提交回复
热议问题