This subflow will allow you to upload files to your Synology NAS in a quick and simple way.

It will check to see if a sesison token already exists and if not will log in and create one for you.

---

# Node Configuration
## Address
The full URL and port of your Synology NAS.
Example: `https://nas.myds.com:5001` 

## Username
The name of the user to login to the NAS with.  It is suggested that you use a separate user account for backups

## Password
The password of the above username

---

# Inputs
## `msg.localFile`
The full name and path of the file you want to upload to your NAS. 

## `msg.remotePath`
The full path on your NAS of where you want to put the file.

## `msg.login` (optional)
If set to `true` then the curent session token is removed and a new one generated.  This will also reset the 7 day timeout.

## `msg.logout` (optional)
If set to `true` then the current session token is removed and the synology session closed.

The Synology default timeout for all session tokens is 7 days.

---

# Outputs
## Output
On login, logout or file upload all messages will be send to the first output of the node.

## Debug
Shows all messages coming from the node.

## Error
If an error occurs it will be sent to the second output of the node with all the data relating to the error.

An internal lookup table will also show you the error message as well as the returned error number.