Examples

instanceUploadDir returns the absolute path to the instance’s upload folder on the server, e.g. /usr/local/neolane/nl6/var/instance1/upload/. It sits in the πŸ“• instanceVarDir (.../instance1/), so use this property rather than deriving the upload path from instanceVarDir.

It is available as a read-only string on the application singleton, set by the deployment and not changeable from script.

Build a path in the upload folder

Anchor a file to the upload folder instead of hardcoding the path:

var strFilePath = "export.csv";
var fullFileName = application.instanceUploadDir + "/" + strFilePath; // /usr/local/neolane/nl6/var/instance1/upload/export.csv

Reuse the folder for several files

Resolve the folder once, then derive each file path from it:

var uploadDir = application.instanceUploadDir + "/";
var dataFile = uploadDir + "recipients.csv";
var doneFile = uploadDir + "recipients.done";

See also