Mercurial > hgrepos > hgweb.cgi > 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 wrap: on
line diff
--- 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