
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@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|| |
The npm package @x-edu/attachments receives a total of 1 weekly downloads. As such, @x-edu/attachments popularity was classified as not popular.
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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.