From 6a28bd2fa8c7eb14512d791856a070b6c7b04e89 Mon Sep 17 00:00:00 2001 From: yl2014 <842237798@qq.com> Date: Thu, 3 May 2018 15:57:34 +0800 Subject: [PATCH] fixed: params with '#' character --- src/FileUpload.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FileUpload.js b/src/FileUpload.js index 7c9b192..6510f83 100644 --- a/src/FileUpload.js +++ b/src/FileUpload.js @@ -283,7 +283,7 @@ const FileUpload = React.createClass({ const paramArr = [] param['_'] = mill Object.keys(param).forEach(key => - paramArr.push(`${key}=${param[key]}`) + paramArr.push(`${key}=${encodeURIComponent(param[key])}`) ) paramStr = '?' + paramArr.join('&') } @@ -410,7 +410,7 @@ const FileUpload = React.createClass({ param['_'] = mill param['ie'] === undefined && (param['ie'] = 'true') for (const key in param) { - if(param[key] != undefined) paramArr.push(`${key}=${param[key]}`) + if(param[key] != undefined) paramArr.push(`${key}=${encodeURIComponent(param[key])}`) } paramStr = '?' + paramArr.join('&') }