Author |
Message |
07/02/2020 15:10:57
|
unger
Power User
Joined: 22/07/2008 05:19:28
Messages: 261
Offline
|
Hi!
Is it possible to use environment variables in eclntconfig.xml?
Example that does not work:
Code:
<clientconfig>
<localdirectory value='%USERPROFILE%\temp\eclnt\local'/>
<suppressautofilefunctions value='false'/>
</clientconfig>
Regards,
Joachim
|
|
|
07/02/2020 15:22:20
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5520
Offline
|
Hi,
no - not possible.
Regards, Björn
PS: @all - this question is about the JavaSwing client! So please do not get confused.
|
Björn Müller, CaptainCasa GmbH |
|
|
07/02/2020 17:21:20
|
unger
Power User
Joined: 22/07/2008 05:19:28
Messages: 261
Offline
|
Hi Björn,
what is the default - omitting the tag.
And is there another way to set the download (lokal) folder?
Regards,
Joachim
|
|
|
09/02/2020 10:14:35
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5520
Offline
|
Default ist:
Code:
FileUtil.getClientTempDirectory() + "eclnt/local/"
and
public static String getClientTempDirectory()
{
String osName = null;
try { osName = System.getProperty("os.name"); } catch (Throwable t) {}
if (osName == null) osName = "Windows";
try
{
if (s_clientTempDirectory != null)
return s_clientTempDirectory;
File tempFile = File.createTempFile("test",null);
String dirName = tempFile.getAbsolutePath();
dirName = ValueManager.encodeIntoValidFileName(dirName,false);
int lastSlash = dirName.lastIndexOf('/');
s_clientTempDirectory = dirName.substring(0,lastSlash+1);
if (osName.contains("Windows") == false)
{
String userName = null;
try { userName = System.getProperty("user.name"); } catch (Throwable t) {}
if (userName == null) userName = "nouserdefined";
s_clientTempDirectory = s_clientTempDirectory + userName + "/";
}
return s_clientTempDirectory;
You see: it's the OS's temp-directory. For non-windows the current user name is appended as well.
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
09/02/2020 13:42:52
|
unger
Power User
Joined: 22/07/2008 05:19:28
Messages: 261
Offline
|
Hi Björn,
the solution: Set filename attribute of t:filedownload appropriately ;-)
Regards,
Joachim
|
|
|
10/02/2020 06:57:02
|
unger
Power User
Joined: 22/07/2008 05:19:28
Messages: 261
Offline
|
Hi Björn,
You see: it's the OS's temp-directory. For non-windows the current user name is appended as well.
Most of our clients are using Windows. Is there a method to ensure that users's %temp% isn't deleted or set to system's temp? - Or any mechanism to avoid downloads of critical documents to c:\temp (systems's temp)?
Regards,
Joachim
|
|
|
|