Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TIWURLWindow question
#1
Hi, I'm using the TIWURLWindow-control to show the contents of a PDF file with following code found in your examples
Code:
procedure TfrmMain.SendPdfStreamToURLWindow(const aPDFFile, aUserFilename: string);
var
  xURL: string;
  xFileStream: TFileStream;
begin
  uwAnteprima.URI := '';
  xFileStream := TFileStream.Create(aPDFFile, fmOpenRead);
  try
    xURL := TIWAppCache.StreamToCacheFile(Self, xFileStream, TIWMimeTypes.GetAsString(mtPDF), ctOneTime);
    uwAnteprima.URI := xURL;
  finally
    xFileStream.Free;
  end;
end;
All works fine. Now the pdf-viewer (f.e. in Edge or Chrome) has a "download"-button. Clicking it, the browser shows a "cryptic" name. Is there a way to force the cache-filename with the name of my choice (original name or somewhat stored in my underlying database)?
thanks and best regards
Toni Santa
Reply


Messages In This Thread
TIWURLWindow question - by Toni Santa - 07-31-2019, 09:41 AM
RE: TIWURLWindow question - by Jose Nilton Pace - 07-31-2019, 11:37 AM
RE: TIWURLWindow question - by Toni Santa - 07-31-2019, 02:20 PM
RE: TIWURLWindow question - by Jose Nilton Pace - 07-31-2019, 04:38 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)