s4
changeset 323:db840ea6e347
Eliminate filename for "file" command befause of spaces in filenames.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Fri, 21 Oct 2016 10:38:29 +0859 |
parents | 18be0c210dc8 |
children | dfebe6b99203 |
files | sendmultipart.sh |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line diff
1.1 --- a/sendmultipart.sh Thu Oct 20 17:20:58 2016 +0859 1.2 +++ b/sendmultipart.sh Fri Oct 21 10:38:29 2016 +0859 1.3 @@ -3,7 +3,7 @@ 1.4 # (C)2012,2015 by HIROSE Yuuji [yuuji(at)yatex.org] 1.5 # You can obtain the latest version of this script from: 1.6 # http://www.gentei.org/~yuuji/software/sendmultipart.sh 1.7 -# Last modified Mon Aug 3 18:40:15 2015 on firestorm 1.8 +# Last modified Fri Oct 21 10:37:19 2016 on firestorm 1.9 # 1.10 # Typical usage: 1.11 # echo "Hi, here's photo I've taken. Enjoy" | \ 1.12 @@ -110,7 +110,7 @@ 1.13 ;; 1.14 *) 1.15 echo -n "Content-Type: " 1.16 - file --mime-type $file | cut -d' ' -f2 1.17 + file --mime-type - < "$file" | cut -d' ' -f2 1.18 echo "Content-Transfer-Encoding: base64" 1.19 echo "Content-Disposition: inline; filename=\"$file\"" 1.20 echo