fix comma in filename (curl param)

This commit is contained in:
François 2023-01-16 17:30:37 +01:00
parent d172596a5d
commit 29ba4fd0d6
2 changed files with 5 additions and 3 deletions

3
src/bash/filter.sh Executable file → Normal file
View File

@ -123,7 +123,8 @@ curlJirafeauSend () {
type=$3
[ -z "${type}" ] && type="text/plain"
LOG_FIC " - curl -X POST -F \"time=$1\" -F \"key=$5\" -F \"file=@$2;type=${type};filename=$4\" \"${JIRAFEAU_LOCAL}/a.php\""
curl -X POST -F "time=$1" -F "key=$5" -F "file=@$2;type=${type};filename=$4" "${JIRAFEAU_LOCAL}/a.php"
LOG "curl -X POST -F \"time=$1\" -F \"key=$5\" -F \"file=@$2;type=${type};filename=\\\"$4\\\"\" \"${JIRAFEAU_LOCAL}/a.php\""
curl -X POST -F "time=$1" -F "key=$5" -F "file=@$2;type=${type};filename=\"$4\"" "${JIRAFEAU_LOCAL}/a.php"
}
#################### MAIN #################################################

5
src/bash/filterTest.sh Executable file → Normal file
View File

@ -61,6 +61,7 @@ usage () {
########################################
# recherche des binaires
mbox=$(realpath "$1")
cd $(dirname $0)
eMailShrinker="$(realpath "./eMailShrinker")"
[ -x "${eMailShrinker}" ] || eMailShrinker="$(realpath "../../build/out/eMailShrinker")"
@ -85,7 +86,6 @@ esac
[ "$#" -eq 1 ] || usage
########################################
mbox=$(realpath "$1")
dos2unix "${mbox}"
DOMAINNAME="$(cat domainname)"
JIRAFEAU_URL="https://depot.${DOMAINNAME}"
@ -112,7 +112,8 @@ curlJirafeauSend () {
type=$3
[ -z "${type}" ] && type="text/plain"
curl -X POST -F "time=$1" -F "key=$5" -F "file=@$2;type=${type};filename=$4" "${JIRAFEAU_LOCAL}/a.php"
LOG "curl -X POST -F \"time=$1\" -F \"key=$5\" -F \"file=@$2;type=${type};filename=\\\"$4\\\"\" \"${JIRAFEAU_LOCAL}/a.php\""
curl -X POST -F "time=$1" -F "key=$5" -F "file=@$2;type=${type};filename=\"$4\"" "${JIRAFEAU_LOCAL}/a.php"
#"${jirafeauAPI}" -f "${JIRAFEAU_LOCAL}" -t "$1" -s "1Gi" -c "${type}" -n "$4" send "$2" "$5"
}