/*file = e.target.files[0]; //采用时间戳重命名 var last=file.name.substr(file.name.lastIndexOf("."),file.name.length) var fileName=Date.parse(new Date()) + last; debugger; client.multipartUpload("videoCourse/"+fileName, file).then(function(res) { //参数fileName为图片名称,参数file为图片 /!*!//上传成功后的图片地址 var fileUrl = res.url ? res.url : 'http://'+ res.bucket + '.oss-cn-beijing.aliyuncs.com/videoCourse/' + res.name; console.log(fileUrl)*!/ //上传成功 var picture=document.createElement("img"); picture.setAttribute("class","upDateImg") picture.src=fileUrl $("#imgBox").append(picture); //删除 $("img").on("click",function(){ console.log(this) $(this).remove() }) }, function() { console.log('上传文件失败','warning'); })*/
oss 直流上传, 4.4.4版本的已不维护,不要跳坑
最新推荐文章于 2024-01-11 18:46:43 发布