Am building a document management system and using the new streamto/streamfrom server functions.
Am at the stage now where if the user wants to delete a version of a file from the solution I also want to delete the remote file. Using the following code:
- Code: Select all
var remote_name = "/" + document_master_to_document_versions.remote_file_name;
var f = plugins.file.convertToRemoteJSFile(remote_name);
if (f && f.canRead())
{
application.output('File can be read.');
}
if (plugins.file.deleteFile(f));
{
application.output('File deleted.');
}
this code produces the correct console outputs and shows no errors but the file remains in the remote file directory on the server.
Any help would be appreciated.