From 2d2bd79f82cb81e6f542e298f83bb6fc1e80520f Mon Sep 17 00:00:00 2001 From: wangxueliang Date: Fri, 1 Mar 2019 23:19:20 +0800 Subject: [PATCH] feat: update vc-upload to 2.6.3 --- components/vc-upload/index.js | 2 +- components/vc-upload/src/IframeUploader.jsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/vc-upload/index.js b/components/vc-upload/index.js index a0ef75b24..7b5aa8555 100644 --- a/components/vc-upload/index.js +++ b/components/vc-upload/index.js @@ -1,4 +1,4 @@ -// rc-upload 2.6.2 +// rc-upload 2.6.3 import upload from './src'; export default upload; diff --git a/components/vc-upload/src/IframeUploader.jsx b/components/vc-upload/src/IframeUploader.jsx index a6e8ed407..49368d224 100644 --- a/components/vc-upload/src/IframeUploader.jsx +++ b/components/vc-upload/src/IframeUploader.jsx @@ -67,8 +67,10 @@ const IframeUploader = { // http://stackoverflow.com/questions/12830058/ie8-input-type-file-get-files const file = (this.file = { uid: getUid(), - name: target.value, - }); + name: + target.value && + target.value.substring(target.value.lastIndexOf('\\') + 1, target.value.length), + });; this.startUpload(); const { $props: props } = this; if (!props.beforeUpload) {