!Upload with approval and move files.\\

This job requires a CrushFTP Enterprise license to work.\\
You can set up an event to trigger a job that will email the assigned approver to allow or reject the uploaded files and write an automatic entry into an audit log.\\

The limited user will have a folder that has upload only and another folder that has download only permissions.
The approver user assigned to accept or reject the files will also need view permission for the upload folder.\\






The assigned approver user will need to add a custom button under UserManager, UserName (default for all users), in the QuickJump select Webinterface, scroll down a little and at the Buttons section click on 'Add'\\



Next, we add an event on the approver, its type must be 'Custom' and to do it immediately, and do it async.


We first assign a variable to hold the home folder name of this user, and we grab it out of the URL.  So in our example, position 6 of the url is the folder who's name matches the username.  {6url} gives that to us,a nd we assign it to a variable for use.



The jump conditional will check to make sure the approver is not approving their own file, and if they are, deny it and log an audit log entry.
Set the jump conditional to validate: {upper_start}{username}{upper_end} Doesn't Equal {upper_start}{home_folder_of_file}{upper_end}



We move the item passed in from the approval to go up one level from the upload folder, then into the download folder to move the file there.


We use a WriteFile task to write a log entry to an audit log file on our drive.


And if they fail, we write a failure message.