mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-01-27 08:28:13 -05:00
15 lines
416 B
JavaScript
15 lines
416 B
JavaScript
|
import weiboUpload from './weiboUpload'
|
||
|
import qiniuUpload from './qiniuUpload'
|
||
|
import db from '../../datastore/index'
|
||
|
const uploader = (img, type, webContents) => {
|
||
|
const uploadType = db.read().get('picBed.current').value()
|
||
|
switch (uploadType) {
|
||
|
case 'weibo':
|
||
|
return weiboUpload(img, type, webContents)
|
||
|
case 'qiniu':
|
||
|
return qiniuUpload(img, type, webContents)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default uploader
|