STEP 1 - CREATE AUTOAPPS PROFILE
This will make the profile create a %file variable whenever it's triggered with the value on the right of =:= which in this case will be the url of a file pushed from Chrome on your PC
- Create a new profile with the AutoApps Command event condition
- Set the Command Filter to pi=:=
- Set the Variable Names to file
- Accept and create an entry task
STEP 2 - READ SERVER SETTINGS
I had previously saved my raspberry pi SSH server settings in a JSON string in a Tasker global variable. The JSON is something like this:
- Add a Flash action showing that you are going to upload the file
- Add an AutoTools Json Read action
- Set the Json field to %XBIAN
- Set the Fields field to server,user,password
Check here if you want to learn more about reading JSON.Code (Text):
{
"server":"192.167.6.5",
"user":"my user",
"password":"my password"
}
STEP 3 - SEND FILE TO SSH SERVER
By ending the Remote Files with / you're telling AutoTools to keep the original file name and send the file to the specified folder. This would work with multiple files as well.
- Add an AutoTools SSH action
- Set the server settings accordingly
- Set the Local Files field to %file
- Set the Remote Files field to backups/
- Accept and go back to Tasker
- Add another Flash action saying that the upload is done.
STEP 4 - TEST
If you now go to your Chrome browser, right click on an image -> Join -> Your Device -> Image -> Send Tasker Command and write pi it'll start uploading that file to your Raspberry Pi into the specified folder.
Backup online files from your browser to your Rapsberry Pi (or any other SSH server)
Use Join to push a file from your Chrome browser to your Raspberry Pi