Copy link to clipboard
Copied
Hello, I've read discussions about issues with File.copyTo. But I have still a problem. I am upgrading my server from FMS 3.5 to AMS 5.0. In the conf/Server.xml I changed the option for Virtual Directory for file, to enable it :
<VirtualDirectoryForFile enable="true"></VirtualDirectoryForFile>
In my Application.xml, I have this :
<ScriptEngine>
<FileObject override="no">
<VirtualDirectory>/DataFlash;D:\DataFlash</VirtualDirectory>
</FileObject>
</ScriptEngine>
Then I tried this example from documentation (http://help.adobe.com/en_US/adobemediaserver/ssaslr/WS5b3ccc516d4fbf351e63e3d11a11afc95e-7eacSSASLR....), File.open, I tried this in my .asc file :
this.acceptConnection(client);
var logFile = new File("log.txt");
if(!logFile.exists){
logFile.open("text", "append");
logFile.write("something", "somethingElse")
}
At this point, it's working, when I run the scripts, I've got new log.txt file in my Application folder (where AMS is installed).
But if I change the script like this :
var logFile = new File("/DataFlash/log.txt");
The, I get an error :
Error: File operation write failed.
It seems that my Virtual Directory for file is not working.
I've got something working with a virtual directory for stream, but it's KO for file ! I don't understand why.
In my vhost configuration Application.xml, there is nothing special.
I have also a false return when I try :
myDir = new File("/DataFlash");
trace(myDir.isDirectory);
D:\DataFlash is settled why read and write permissions.
I don't want to use folders in install path (C:\Program...).
Can anyone help me to understand what is wrong with my Virtual Directory for file ?
Thanks
Copy link to clipboard
Copied
Hum, I am still working on this issue. There is someting new. I tried with a new configuration. I deleted <VirtualDirectory> in Application.xml wich is located in my application folder, and I add <VirtualDirectory> in Application.xml wich is in conf/_defaultRoot_/_defaultVHost_/. And then it seems to work better. It can be a solution... But it's strange. I'll continue to test.
Copy link to clipboard
Copied
You cannot set virtual directories outside of the application root.
Copy link to clipboard
Copied
Hum, I confirm, I succeeded to setup virtual directories in :
D:\Data\Temp
with an application wich is in :
C:\Program Files\Adobe\Adobe Media Server 5\applications\application
.
It is working since I add VirtualDirectory in :
C:\Program Files\Adobe\Adobe Media Server 5\conf\_defaultRoot_\_defaultVHost_\Application.xml
.
But it was not working with VirtualDirectory added in :
C:\Program Files\Adobe\Adobe Media Server 5\applications\application\Application.xml
.
Strange or not ?