|
@@ -45,7 +45,7 @@ export const client = new OSS({
|
|
|
region: 'oss-cn-hangzhou', // oss地址
|
|
|
accessKeyId: 'LTAI5tQDWoM9c1WyJNPs86rX', // 通过阿里云控制台创建的AccessKey ID。
|
|
|
accessKeySecret: '84dDIx4edT1n78KUOqqSmDZ35pchJv', // 通过阿里云控制台创建的AccessKey Secret。
|
|
|
- bucket: 'xgxm-test', // 仓库名字
|
|
|
+ bucket: 'xg-pg', // 仓库名字
|
|
|
useFetch: true, // 支持上传大于100KB的文件
|
|
|
secure: false // 返回的url为https
|
|
|
})
|
|
@@ -109,9 +109,9 @@ export function fileName (file) {
|
|
|
|
|
|
export function beforeAvatarUpload (file) {
|
|
|
// 文件大小校验
|
|
|
- const isLt2M = file.size / 1024 / 1024 < 300
|
|
|
+ const isLt2M = file.size / 1024 / 1024 < 1024
|
|
|
if (!isLt2M) {
|
|
|
- this.$message.error('文件大小不能超过 300M !')
|
|
|
+ this.$message.error('文件大小不能超过 1G !')
|
|
|
}
|
|
|
return isLt2M
|
|
|
}
|