# HG changeset patch # User HIROSE Yuuji # Date 1477013935 -32374 # Node ID db840ea6e347c6aa1527c242ec2c9a905f44867e # Parent 18be0c210dc805b560963609b3ac9f07ef537585 Eliminate filename for "file" command befause of spaces in filenames. diff -r 18be0c210dc8 -r db840ea6e347 sendmultipart.sh --- a/sendmultipart.sh Thu Oct 20 17:20:58 2016 +0859 +++ b/sendmultipart.sh Fri Oct 21 10:38:29 2016 +0859 @@ -3,7 +3,7 @@ # (C)2012,2015 by HIROSE Yuuji [yuuji(at)yatex.org] # You can obtain the latest version of this script from: # http://www.gentei.org/~yuuji/software/sendmultipart.sh -# Last modified Mon Aug 3 18:40:15 2015 on firestorm +# Last modified Fri Oct 21 10:37:19 2016 on firestorm # # Typical usage: # echo "Hi, here's photo I've taken. Enjoy" | \ @@ -110,7 +110,7 @@ ;; *) echo -n "Content-Type: " - file --mime-type $file | cut -d' ' -f2 + file --mime-type - < "$file" | cut -d' ' -f2 echo "Content-Transfer-Encoding: base64" echo "Content-Disposition: inline; filename=\"$file\"" echo