MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / normFile

Function normFile

frontend/packages/common/src/utils/uploadPic.ts:3–8  ·  view source on GitHub ↗
(e: unknown)

Source from the content-addressed store, hash-verified

1import { RcFile } from 'antd/es/upload'
2
3export const normFile = (e: unknown) => {
4 if (Array.isArray(e)) {
5 return e
6 }
7 return (e as { fileList: unknown })?.fileList
8}
9
10export const compressImage = (file: RcFile, maxSize: number): Promise<string> => {
11 const img = document.createElement('img')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected