提交 6fd2208b authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 93965ea6
...@@ -3,11 +3,11 @@ import Editor from '@tinymce/tinymce-vue' ...@@ -3,11 +3,11 @@ import Editor from '@tinymce/tinymce-vue'
import md5 from 'blueimp-md5' import md5 from 'blueimp-md5'
import { getSignature, uploadFile } from '@/api/base' import { getSignature, uploadFile } from '@/api/base'
const ImageUploadHandler = blobInfo => const ImageUploadHandler = (blobInfo: any) =>
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
const file = blobInfo.blob() const file = blobInfo.blob()
getSignature() getSignature()
.then(response => { .then((response: any) => {
const prefix = 'upload/admin/' const prefix = 'upload/admin/'
const key = prefix + md5(file.name + new Date().getTime()) + file.name.substr(file.name.lastIndexOf('.')) const key = prefix + md5(file.name + new Date().getTime()) + file.name.substr(file.name.lastIndexOf('.'))
const { accessid, policy, signature, host } = response const { accessid, policy, signature, host } = response
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论