This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - JScript Client side method to download dependent files

Triadian - Wednesday, March 9, 2011 2:45 AM:

Hi All,

 My requirement is to download the depenednt files on 'View' event. I have gone through the client side JScript method 'Load Viewer' method in 'File' form 'OnLoad' event.I have to extend the functionality of this method as this one navigates only the selected file . Since If I have to use 'uiNavigateWindowWithUserCredentialsCCE(top.window, fileURL)' function only on the assembly file, I have to dowload the rest of the dependent files to the same location where the assembly is downloaded ( into the internet cache) before the assembly is opened in the viewer. My problem is to find the location where the assembly is downloaded. Is it possible to get the cache path in the client machine in JScript? If not I need to find a path in client m/c to download the files (say temp folder) other than Aras working directory to dwonload files. I tried creating 'Scripting.FilesystemObject' ,which fails even when the server is added to trusted sites.Please help me out to find some folder in the client machine (other than working folder) in JScript...

 Regards,

 Shafi



aknourenko - Wednesday, March 9, 2011 2:38 PM:

Check out the "Vault" control (click on Help->API Reference and look at Aras.Client.Controls.VaultApplet class); it has all the methods you need. You can get a handle to the "vault" control through top.aras.vault.



Triadian - Thursday, March 10, 2011 6:21 AM:

Hi aknourenko,

Thanks for the reply. I was able to download successfully using 'DownloadFile' method. I tried to use the 'AddFileToDownloadList' method by filling up the fileurls obtained by using top.aras.getFileURLEx() function and was expecting to download all the files at once, without any success. I also  tried 'DonwloadFileAndExecute' function by passing the url obtained using top.aras.getFileURLEx() ,but the function was throwing exception becuse of some illegal characters.Any example of how to use these methods will be helpful

Regards,

Shafi