Socket
Book a DemoInstallSign in
Socket

@x-edu/attachments

Package Overview
Dependencies
Maintainers
9
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@x-edu/attachments

```jsx const uc = new UC({ ... }) export default function Demo() { const [userInfo, setUserInfo] = useState(null)

npmnpm
Version
0.1.9
Version published
Weekly downloads
3
200%
Maintainers
9
Weekly downloads
 
Created
Source

x-edu/attachments

VerifyCodePhone 文件上传

const uc = new UC({
  ...
})
export default function Demo() {
  const [userInfo, setUserInfo] = useState(null)

  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={true}
        uc={uc}
        getCSToken={getCSToken}
        userInfo={userInfo}
        imgOnlyPreview
        attachmentUploadPath="/homework/attachment"
        env="preproduction"
      />
  )
}

FAQs

Package last updated on 29 Jul 2024

Did you know?

Socket

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.

Install

Related posts