diff options
Diffstat (limited to 'fb-helper.sh.in')
-rw-r--r-- | fb-helper.sh.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fb-helper.sh.in b/fb-helper.sh.in index e6868f6..0c023fb 100644 --- a/fb-helper.sh.in +++ b/fb-helper.sh.in @@ -14,8 +14,8 @@ CURLOPTS="-n -L -A $USERAGENT" if [ "$mode" = "u" ]; then basefilename=`basename -- "$file"` if [ `$STAT -- "$file"` -eq "0" ] || echo "$basefilename" | grep -F -q ","; then - basefilename=`echo "$basefilename" | tr -d ,` - curl $CURLOPTS -F "file=@-;filename=$basefilename" "$url" < "$file" -o /dev/stdout + base64fn=`echo "$basefilename" | base64 -w0 ` + curl $CURLOPTS -F "file=@-" -F "filename=$base64fn" "$url" < "$file" -o /dev/stdout else curl $CURLOPTS -F "file=@$file" "$url" -o /dev/stdout fi |