如何在 ant-d 中获取上传文件的文件路径?



大家!

我在 React 应用程序中使用 ant-d 上传组件 (https://ant.design/components/upload/(。

我想获取文件路径,如下所示:C://Documents/file.txt(因为我使用 FormData 保存表单,所以我应该发送文件的文件路径(。

有谁知道这是否可能?据我所知,现在这是不可能的。

看看customRequest属性。在该函数中,为您提供了一个具有filename属性的对象。

https://github.com/react-component/upload#customrequest 有一个位模式文档(在下面使用此组件(

最新更新