From 61d4b4c4652564173fec78c250d7fd7dbd9ef10b Mon Sep 17 00:00:00 2001 From: qiang Date: Wed, 20 May 2020 16:39:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20saveImageToPhotosAlbum=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=8F=82=E6=95=B0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../protocol/media/save-image-to-photos-album.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/core/helpers/protocol/media/save-image-to-photos-album.js diff --git a/src/core/helpers/protocol/media/save-image-to-photos-album.js b/src/core/helpers/protocol/media/save-image-to-photos-album.js new file mode 100644 index 000000000..644896192 --- /dev/null +++ b/src/core/helpers/protocol/media/save-image-to-photos-album.js @@ -0,0 +1,11 @@ +import getRealPath from 'uni-platform/helpers/get-real-path' + +export const saveImageToPhotosAlbum = { + filePath: { + type: String, + required: true, + validator (filePath, params) { + params.filePath = getRealPath(filePath) + } + } +} -- GitLab