Tokay Posted August 14, 2018 Share Posted August 14, 2018 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. Quote Link to comment Share on other sites More sharing options...
Wilton Ergon Posted August 15, 2018 Share Posted August 15, 2018 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 Quote Link to comment Share on other sites More sharing options...
Tokay Posted August 17, 2018 Author Share Posted August 17, 2018 All works, thank you! Quote Link to comment Share on other sites More sharing options...
jahlxx Posted September 3, 2018 Share Posted September 3, 2018 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. Quote Link to comment Share on other sites More sharing options...
Tokay Posted September 3, 2018 Author Share Posted September 3, 2018 UniSession.SendFile(xreport, 'FileNameAtTheUserSide.pdf'); Quote Link to comment Share on other sites More sharing options...
jahlxx Posted September 3, 2018 Share Posted September 3, 2018 ok. thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.