|
@@ -1795,20 +1795,20 @@
|
|
|
<div class="up_photo">
|
|
|
<img src="../assets/icon/uploadImg.png" alt />
|
|
|
</div>
|
|
|
- <!-- <input
|
|
|
+ <input
|
|
|
type="file"
|
|
|
accept="application/pdf, application/.ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, image/*"
|
|
|
capture="camera"
|
|
|
style="display: none"
|
|
|
@change="beforeUpload1($event, 1)"
|
|
|
- /> -->
|
|
|
- <input
|
|
|
+ />
|
|
|
+ <!-- <input
|
|
|
type="file"
|
|
|
accept="image/*"
|
|
|
capture="camera"
|
|
|
style="display: none"
|
|
|
@change="beforeUpload1($event, 1)"
|
|
|
- />
|
|
|
+ /> -->
|
|
|
</div>
|
|
|
<div
|
|
|
class="chapter_add"
|
|
@@ -2444,6 +2444,7 @@ export default {
|
|
|
},
|
|
|
addImg(e) {
|
|
|
var el = e.currentTarget;
|
|
|
+ // this.$message.success('触发上传')
|
|
|
el.getElementsByTagName("input")[0].click();
|
|
|
},
|
|
|
|
|
@@ -2748,6 +2749,8 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
beforeUpload1(event, type, i) {
|
|
|
+ // this.$message.success('进入上传')
|
|
|
+
|
|
|
var file = event.target.files[0];
|
|
|
var credentials = {
|
|
|
accessKeyId: "AKIATLPEDU37QV5CHLMH",
|
|
@@ -2774,7 +2777,8 @@ export default {
|
|
|
ACL: "public-read",
|
|
|
}; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
|
|
|
var options = {
|
|
|
- partSize: 2048 * 1024 * 1024,
|
|
|
+ // partSize: 2048 * 1024 * 1024,
|
|
|
+ partSize: 1024 * 1024* 1024,
|
|
|
queueSize: 2,
|
|
|
leavePartsOnError: true,
|
|
|
};
|
|
@@ -2795,6 +2799,7 @@ export default {
|
|
|
a.splice(a.length - 1, a.length);
|
|
|
_this.$message.error("上传失败");
|
|
|
} else {
|
|
|
+ // _this.$message.success('上传成功')
|
|
|
if (type == 1) {
|
|
|
_this.studyJuri[0].cover.push({
|
|
|
name: file.name,
|
|
@@ -2823,6 +2828,7 @@ export default {
|
|
|
}
|
|
|
_this.imgChange(null, null, type);
|
|
|
console.log(data.Location);
|
|
|
+ // _this.$message.success('上传成功'+data.Location)
|
|
|
}
|
|
|
});
|
|
|
}
|