tangjie 2026-07-15 11:28:34 +08:00
parent cf4e41ee84
commit 3e682fd0aa
1 changed files with 2 additions and 4 deletions

View File

@ -51,12 +51,10 @@ export default function AttachmentUpload({ name, label, disabled = false, maxCou
<Upload <Upload
//disabled={disabled} //disabled={disabled}
listType="picture-card" listType="picture-card"
headers={{
token: sessionStorage.getItem('token')
}}
maxCount={maxCount} maxCount={maxCount}
accept={accept} accept={accept}
action={`${window.process.env.app.API_HOST}/safetyEval/file/upload`} action={`${window.process.env.app.API_HOST}/safetyEval/images/upload`}
beforeUpload={(file) => { beforeUpload={(file) => {
if (!accept) return true; if (!accept) return true;
const rules = accept.split(",").map((e) => e.trim().toLowerCase()); const rules = accept.split(",").map((e) => e.trim().toLowerCase());