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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...