Skip to content

Instantly share code, notes, and snippets.

@amitpatelx
Created April 29, 2019 14:37
Show Gist options
  • Save amitpatelx/c9180ed255d59a8c37d8a1fa713c4456 to your computer and use it in GitHub Desktop.
Save amitpatelx/c9180ed255d59a8c37d8a1fa713c4456 to your computer and use it in GitHub Desktop.
Using CommandExecutable to send file over Firefox Send
require_relative 'command_executable'
class ActiveTransfer
include CommandExecutable
def initialize(file_path)
@file_path = file_path
end
def transfer
execute_shell_command(['ffsend', 'upload', @file_path])
# Return link
output.gsub('Share link: ', '')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment