【问题标题】:React-native fetch upload file and message with formdata, server doesnt get file, but still get message and idReact-native使用formdata获取上传文件和消息,服务器没有获取文件,但仍然获取消息和ID
【发布时间】:2021-06-29 09:10:15
【问题描述】:

我得到一个带有 react-native-document-picker that object i get from file 的文件 然后我做formData =>

let filesToSend = new FormData(); filesToSend.append('Claim_ID', ID); filesToSend.append('Message', message); filesToSend.append('MainFiles', files);

in fetch response i get nothing, if i console.log whole fetch, i will get Network request error, but server still get my request with id and message 我不知道出了什么问题

【问题讨论】:

    标签: react-native file-upload fetch form-data


    【解决方案1】:

    我通过更新 Flipper 解决了这个问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-08-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多