Wade Zhao Posted August 23, 2021 Share Posted August 23, 2021 I save the image file in some subdirectory, if I use this code UniSession.SendFile([exact path],[filename]); Then browser's behavior is start to download it. If I use this code UniSession.AddJS('window.open('''+[image url]+'''',''_blank'');'') I can get the browser to open in a new tab, that is what I want. But my question is: how do I confirm this [image url]? If I put my application‘s .exe file in the c:\app and save the image file in the c:\app\image directory, the [image url] should be "\image\xxx.jpg", but if I compile my application as an ISAPI DLL, will the application still recognize which directory it is in? Since what I want is to click a button and perform different operations for different types of files, so I can't simply add a label with a link to achieve this goal. Quote Link to comment Share on other sites More sharing options...
jrp Posted August 25, 2021 Share Posted August 25, 2021 On 8/23/2021 at 10:19 AM, Wade Zhao said: If I put my application‘s .exe file in the c:\app and save the image file in the c:\app\image directory, the [image url] should be "\image\xxx.jpg", but if I compile my application as an ISAPI DLL, will the application still recognize which directory it is in? Maybe you can use UniServerModule.ServerRoot to get the folder where you put the ISAPI DLL. For example: UniServerModule.ServerRoot+'image\xxx.jpg' Quote Link to comment Share on other sites More sharing options...
Wade Zhao Posted August 26, 2021 Author Share Posted August 26, 2021 9 hours ago, jrp said: Maybe you can use UniServerModule.ServerRoot to get the folder where you put the ISAPI DLL. For example: UniServerModule.ServerRoot+'image\xxx.jpg' Thanks a lot. 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.