Hello,

I?ve got a problem writing files on the server side with Flash Media Server
2.0.2 and 2.0.3. The same code was working fine with an older version of Flash
Media server (2.0.1).

You can see in my code that I?m creating the file and then I try to write in
it. With version 2.0.2 and 2.0.3, Flash media creates the file but can?t write
anything in it. Any ideas why? I?ve check the access rules but everything
seems to be ok (works with Flash Media 2.0.1).

I?m a little lost here, can you please help me???

-------------------------------------------------------------------------
record.file = new File(record.filePath + "/record.xml");

record.filePosition = 0;

if(record.file != null){

if(record.file.open("utf8", "create,readWrite")) {

var recordedData = "<recording><entries>";



// First writing to file

if(record.file.write(recordedData)) {

record.filePosition =
recordedData.length;

}

record.file.close();

}

}





// ... Later in the file...

function writeToFile(newEntry){

// Writing to file (updating)

var opened = record.file.isOpen;

if(!opened) opened = record.file.open("utf8", "readWrite"); //
Re-opening file



if(opened){

// Re-writing file ending

record.file.position = record.filePosition;

record.file.write(newEntry + '</entries>' +
record.statsString + record.infoString + record.configString + '</recording>');

record.filePosition += newEntry.length; // Updating
position in file

record.buffer++;

if(record.buffer > record.bufferLength){

// Write immediatly

record.file.flush();

record.buffer = 0;

}

} else {

trace("Error: Impossible to update file file (file
open failed).");

}

}

:confused;