ElementPlus上传文件图片上传成功了但类于ajax.ts:80 POST http://localhost:8009/task/manifest 404 (Not Found) 报错
·
之前用的是

上传完成前钩子 拿到名称后缀和链接等等
但是虽然上传成功了但是报ajax.ts:80 POST http://localhost:8009/task/manifest 404 (Not Found)错误
下面是更新后代码
<el-upload class="upload-demo" drag :on-remove="handleRemoves" action="#" :http-request="handleBeforeUpload"
:on-success="handleAvatarSuccess" :show-file-list="false">
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">
拖动上传or<em>点击上传</em>
</div>
<template #tip>
<div class="el-upload__tip" v-for="(item, index) in fileListArr" :key="index">
<p><span style="width: 50%;display: inline-block;">{{ item.name }}</span> <span
style="cursor: pointer;" @click="fileDeleteFn(item.id)">X</span></p>
</div>
</template>
</el-upload>
换成了
action="#"
const handleBeforeUpload = (file) => { }
//也是能拿到他里面的各项内容
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)