Skip to content

Commit

Permalink
🐛 Fix: url encode before uploading by url
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #581
  • Loading branch information
Molunerfinn committed Nov 10, 2020
1 parent 2151857 commit ce2b5cd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"keycode": "^2.2.0",
"lodash-id": "^0.14.0",
"lowdb": "^1.0.0",
"picgo": "^1.4.11",
"picgo": "^1.4.12",
"qrcode.vue": "^1.7.0",
"vue": "^2.6.10",
"vue-gallery": "^2.0.1",
Expand Down
5 changes: 3 additions & 2 deletions src/main/apis/app/uploader/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import picgo from '@core/picgo'
import db from '#/datastore'
import windowManager from 'apis/app/window/windowManager'
import { IWindowList } from 'apis/app/window/constants'
import util from 'util'

const waitForShow = (webcontent: WebContents) => {
return new Promise((resolve, reject) => {
Expand Down Expand Up @@ -101,11 +102,11 @@ class Uploader {
}
picgo.removeAllListeners('failed')
})
picgo.once('failed', ctx => {
picgo.once('failed', (e: Error) => {
setTimeout(() => {
const notification = new Notification({
title: '上传失败',
body: '请检查配置和上传的文件是否符合要求'
body: util.format(e.stack)
})
notification.show()
}, 500)
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8289,10 +8289,10 @@ performance-now@^2.1.0:
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=

picgo@^1.4.11:
version "1.4.11"
resolved "https://registry.yarnpkg.com/picgo/-/picgo-1.4.11.tgz#759dde14232cd94b62aa2d3256669014f132babe"
integrity sha512-OdhLpSycS/YjHgHSvWDh46eoW8hYPaMtwNQkW67QkNgji7VHU7rinKnaE5xmOhh6BsgFcgEt8bC+e2uKX3qXYA==
picgo@^1.4.12:
version "1.4.12"
resolved "https://registry.yarnpkg.com/picgo/-/picgo-1.4.12.tgz#c8d1e496cba03795d41d94255fd8dc7567854e66"
integrity sha512-vPopTG66D97o/NmkLxx64oUNwCVWPuOoEaKYQa501VjKbWfmi63S0kLxXbIsoDNIM8rkU11VQinLnouL1Ufv/A==
dependencies:
chalk "^2.4.1"
commander "^2.17.0"
Expand Down

0 comments on commit ce2b5cd

Please sign in to comment.