mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
Use a more common command to get mimetype
This commit is contained in:
parent
03b9ae7cf6
commit
99f3a362d5
1 changed files with 2 additions and 2 deletions
|
|
@ -11,7 +11,7 @@ fi
|
|||
|
||||
if [ -f "$1" ]; then
|
||||
hash=`wget -q -O- --post-file="$1" $proxy/bzzr:/`
|
||||
mime=`mimetype -b "$1"`
|
||||
mime=`file --mime-type -b "$1"`
|
||||
# echo wget -q -O- --post-data="$delimiter\"hash\":\"$hash\",\"contentType\":\"$mime\"}]}" $proxy/bzzr:/
|
||||
wget -q -O- --post-data="$delimiter\"hash\":\"$hash\",\"contentType\":\"$mime\"}]}" $proxy/bzzr:/
|
||||
echo
|
||||
|
|
@ -31,7 +31,7 @@ name=`echo "$path" | cut -c3-`
|
|||
[ _`basename "$name"` = "_$INDEX" ] && name=`dirname "$name"`
|
||||
echo -n "$delimiter"
|
||||
hash=`wget -q -O- --post-file="$path" $proxy/bzzr:/`
|
||||
mime=`mimetype -b "$path"`
|
||||
mime=`file --mime-type -b "$1"`
|
||||
if [ "$mime" = "text/plain" ]; then
|
||||
echo -n $path|grep -q '.css' && mime="text/css"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue