Jump to content

Is it possible to remove file after UniSession.SendFile?


Tokay

Recommended Posts

We used UniSession.SendFile about ten times in different places, and need to delete temporary created files after send files to users. Is it a way to do it? Perfectly if it'll be uniformly in all places, not with many-many timers.

Link to comment
Share on other sites

create the files in the cache folder, so when the user terminates the section, they will be automatically excluded

 

sample

 

Url         :='';
filename :=UniServerModule.NewCacheFileUrl(False, 'pdf', '', '', Url, True);
 
save filename, and use url for download
Link to comment
Share on other sites

  • 3 weeks later...

Hi.

 

I create the file like in your post, but doing sendfile, raises an error: file not exists.

 

wich is the correcto sintax?

 

I do this:

 

   Url:='';
   xreport := UniServerModule.NewCacheFileUrl(False, 'pdf', '', '', Url, True);
...

...

   exp.FileName := xreport;

...

...

      UniSession.SendFile(Url, xreport);

 

 

Something is wrong in sendfile, but I don't know what.

 

Can you help me?

 

Thanks.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...