Method: EvalUploader#upload
- Defined in:
- lib/captured/uploaders/eval_uploader.rb
#upload(file) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/captured/uploaders/eval_uploader.rb', line 12 def upload(file) remote_path = nil remote_name = gen_remote_name(file) unless eval @config['upload']['command'] raise "Upload failed: Bad Eval in config file" end # if the eval defines remote_path we will copy that to the clipboard # otherwise we compute it ouselves @url = remote_path || "#{@config['upload']['url']}#{remote_name}" @url end |