Is there any way to download a file without defined extension (empty, just the name) ?
For some odd reason and integration to old equipment, a client is looking for this solution. That can be done in others HTTP servers. Works ok. But my client wants to use just uniGUI and not install another HTTP server just for this reason, in his cloudserver.
For instance this works in my server: (Link Removed. Solved).
Where "user", at the end of the URL is a text file without extension.
I foun
Hello,
You can try something like this...
//uses list
SysUtils, uIdCustomHTTPServer, uIdGlobal
procedure TUniServerModule.UniGUIServerModuleHTTPCommand(
ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo;
var Handled: Boolean);
begin
if (ARequestInfo.Document <> '') and (SysUtils.FileExists(ExtractFilePath(ParamStr(0)) + ARequestInfo.Document)) then
begin
AResponseInfo.ContentType:='application/octet-stream';
AResponseInfo.ContentStream := TIdRead