ant-design/components/upload/demo/directory.md

29 lines
531 B
Markdown
Raw Normal View History

---
order: 6
title:
zh-CN: 文件夹上传
en-US: Upload directory
---
## zh-CN
支持上传一个文件夹里的所有文件。
## en-US
You can select and upload a whole directory.
```tsx
import { UploadOutlined } from '@ant-design/icons';
2022-05-23 14:37:16 +08:00
import { Button, Upload } from 'antd';
import React from 'react';
const App: React.FC = () => (
<Upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76" directory>
<Button icon={<UploadOutlined />}>Upload Directory</Button>
</Upload>
2018-11-28 15:00:03 +08:00
);
export default App;
2019-05-07 14:57:32 +08:00
```