Occasionally I’ll start a document in the local Editorial file storage and want to upload it to Dropbox. Sometimes it’s the other way around.
This workflow copies the current local file to Dropbox or the current Dropbox document to the local storage in Editorial. It’s smart enough to know which option is appropriate.
The code for copying the file is actually pretty simple. The trick is figuring out where the file currently lives. For this purpose, I’ve created the following action.
The variable origLocation is populated earlier in the script with the current document URL. The Editorial URL scheme contains a parameter that called root that defines where the document is stored. The parameter can be either dropbox or local.1
By testing the URL we can see if the document lives in Dropbox or not.
This workflow creates new versioned documents when copying to Dropbox but will overwrite an existing file when copying to the local storage. The pop-up message provides an appropriate warning.
Technically it can also be absent, which means the document is stored locally. ↩︎