Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C++ example for cache system to send file
#4
Hi, try something like this:
Code:
// get a new temp file name. This method only returns a file name, the file is not created
System::UnicodeString xFileName = TIWAppCache::NewTempFileName();

// Generate PDF using new temp file name created above.
if (oPDFIt->Export(xFileName.c_str(), "Contents Report")) {
  // add the pdf file to the cache. cache type is defined as ctOneTime, i.e., the file will be deleted when served
  UnicodeString xURL = TIWAppCache::AddFileToCache(this, xFileName, TIWMimeTypes::GetAsString(mtPDF), ctOneTime);
  // open a new window with your PDF file
  WebApplication->NewWindow(xURL);
}
Reply


Messages In This Thread
RE: C++ example for cache system to send file - by Jose Nilton Pace - 11-05-2021, 12:21 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)