MCPcopy
hub / github.com/baidu/amis / hasFile

Function hasFile

packages/amis-core/src/utils/helper.ts:1571–1580  ·  view source on GitHub ↗
(object: any)

Source from the content-addressed store, hash-verified

1569
1570// 只判断一层, 如果层级很深,form-data 也不好表达。
1571export function hasFile(object: any): boolean {
1572 return Object.keys(object).some(key => {
1573 let value = object[key];
1574
1575 return (
1576 value instanceof File ||
1577 (Array.isArray(value) && value.length && value[0] instanceof File)
1578 );
1579 });
1580}
1581
1582export function qsstringify(
1583 data: any,

Callers 1

wrappedFetcherFunction · 0.90

Calls 1

keysMethod · 0.80

Tested by

no test coverage detected