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. 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 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! 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. 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'); Link to comment Share on other sites More sharing options...
jahlxx Posted September 3, 2018 Share Posted September 3, 2018 ok. thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now