diff --git a/pages/upload/camera_capture.nvue b/pages/upload/camera_capture.nvue index 3395d54..fb3e72a 100644 --- a/pages/upload/camera_capture.nvue +++ b/pages/upload/camera_capture.nvue @@ -6,6 +6,7 @@ :style="'width:' + camSize + 'px;height:' + camSize + 'px;margin-top:' + frameTop + 'px;margin-left:' + frameLeft + 'px;'" flash="off" facing="back" + photoSuffix="jpg" @onPictureTaken="onPictureTaken" @onCameraOpened="onCameraOpened" > diff --git a/utils/minio.js b/utils/minio.js index f60aefe..3f29f96 100644 --- a/utils/minio.js +++ b/utils/minio.js @@ -190,6 +190,7 @@ export function uploadImage(filePath, typeDir) { var datePath = now.getFullYear() + '-' + pad(now.getMonth() + 1) + '-' + pad(now.getDate()) var ext = (filePath.match(/\.(\w+)$/) || [])[1] || 'jpg' ext = ext.toLowerCase() + if (ext === 'jpeg') ext = 'jpg' var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { var r = Math.random() * 16 | 0 return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)