【问题标题】:How to use Ant Design Upload component it's not sending anything如何使用 Ant Design Upload 组件它不发送任何内容
【发布时间】:2018-04-24 01:57:37
【问题描述】:

我正在尝试使用Upload 组件

<Upload
  action="//localhost:3001/api/v1/file/upload"
  listType="picture-card"
  fileList={fileList}
  onPreview={this.handlePreview}
  onChange={this.handleChange}
>

但在端点 API 上,当我选择要上传的文件时,我什么也没有收到。

【问题讨论】:

    标签: antd


    【解决方案1】:

    你会试试这个吗?我认为'//'都不会评估您的本地主机端点,请尝试忽略它或执行'http://'或'https://'

    <Upload
      action="localhost:3001/api/v1/file/upload"
      listType="picture-card"
      fileList={fileList}
      onPreview={this.handlePreview}
      onChange={this.handleChange}
    >
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-02-06
      • 2022-01-22
      • 1970-01-01
      • 2019-10-22
      • 1970-01-01
      • 1970-01-01
      • 2023-01-20
      • 1970-01-01
      相关资源
      最近更新 更多