Avatar

Level 2

Hi Debabrata.T,

Let me clear this. That 'res' stands for public file resources directory(I just got this info from some forum - so anyone can correct me if i'm wrong).

So even if I have 'res' that works in one instance and doesn't work in another instance. I tested the following and getting same result.

var serverFileResourceLocation = "/usr/local/neolane/nl6/var/res/<instance_name>/<file_name.extension>";  

if (!file.copyTo(serverFileResourceLocation)) 

     logError ("File '" + file.name + "' was not copied"); 

else

     logInfo('copied successfully');

I see that I'm not able to copy a new file into that directory:

I'm unable to write my_file.pdf into 'res/my_instance_name' directory "/usr/local/neolane/nl6/var/res/my_instance_name/my_file.pdf".

Hope this helps to give me a solution.