Created
April 29, 2019 14:37
-
-
Save amitpatelx/c9180ed255d59a8c37d8a1fa713c4456 to your computer and use it in GitHub Desktop.
Using CommandExecutable to send file over Firefox Send
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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