From 4a1a9a10e02904e45a06324f229de8936db6bf36 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Mon, 25 Mar 2019 14:13:23 +0000 Subject: [PATCH] Allow overriding the "remote filename" --- ix.io-upload | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ix.io-upload b/ix.io-upload index 4fcdda9..b36081b 100755 --- a/ix.io-upload +++ b/ix.io-upload @@ -1,2 +1,5 @@ #!/bin/bash -echo "$(curl -sF "f:1=@${1}" http://ix.io/)+/${1}" | sed 's,#,%23,g' +localfile="$1" +remotefile="${2:-${1}}" +remotefile="${remotefile##*/}" +echo "$(curl -sF "f:1=@${localfile}" http://ix.io/)+/${remotefile}" | sed 's,#,%23,g'