
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
@x-edu/attachments
Advanced tools
| 参数 | 参数类型 | 是否必填 | 参数说明 | 默认值 | | ---------- | -------- | -------- | ------------------------------------------------------------ |----| | attachmentPreviewEnable | number | 是 | 是否开启预览|1| | sdpAppId | string | 是 | sdpAppId|| |
{Object} options
参数 | 参数类型 | 是否必填 | 参数说明 | 默认值 |
---|---|---|---|---|
attachmentPreviewEnable | number | 是 | 是否开启预览 | 1 |
sdpAppId | string | 是 | sdpAppId | |
env | string | 是 | 环境 | preproduction |
uc | uc | 是 | uc | |
userInfo | object | 是 | 用户信息 | {} |
getCSToken | () => { } | 是 | geToken | '' |
attachmentUploadPath | string | 是 | 文件上传路径 | '' |
containerClassName | string | 否 | 容器classNanme | |
editable | boolean | 否 | 是否开启上传 | false |
description | string | 否 | 描述 | 添加图片、视频、音频、文件等附件 |
extraProps | object | 否 | 上传按钮前面的扩展 | |
fileSizeLimit | number | 否 | 大小限制 | 10 * 1024 * 1024 |
attachmentMaxCount | number | 否 | 上传数量限制 | 8 |
btnName | string | 否 | 上传按钮名称 | 添加附件 |
fileDatas | [] | 否 | 文件预览列表 | [] |
filePreview | () => { } | 否 | 自定义文件预览 | |
fileDownload | () => { } | 否 | 自定义文件下载 | |
uploadFileType | array | 否 | 文件上传类型 | [] |
videoUrl | object | 否 | fishUI的video组件地址配置 | null |
const uc = new UC({
...
})
export default function Demo() {
const [userInfo, setUserInfo] = useState(null)
const getCSToken = () => {}
useEffect(() => {
async function init() {
try {
await uc.login({
...
})
const info = await uc.getInfo() // 伪代码
setUserInfo(info)
} catch (error) {
console.log(error)
}
}
init()
}, [])
if (!userInfo) {
return null
}
return (
<Attachments
fileDatas={data}
editable={false}
uc={uc}
getCSToken={getCSToken}
userInfo={userInfo}
imgOnlyPreview={true}
attachmentUploadPath="/xxxx/xxx"
env="preproduction"
attachmentPreviewEnable="1"
/>
)
}
FAQs
| 参数 | 参数类型 | 是否必填 | 参数说明 | 默认值 | | ---------- | -------- | -------- | ------------------------------------------------------------ |----| | attachmentPreviewEnable | number | 是 | 是否开启预览|1| | sdpAppId | string | 是 | sdpAppId|| |
We found that @x-edu/attachments demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.