在不使用JQuery的情况下在react + typescript中上传文件?

时间:2017-08-10 11:45:00

标签: reactjs typescript file-upload react-redux

我想只使用react(带有typescript)而不使用JQuery将文件从客户端上传到服务器。我找不到任何解决方案。

2 个答案:

答案 0 :(得分:1)

您可以尝试这样的事情:

Dim temp As String temp = Cells(rw, j).Value temp = Trim(temp) Cells(rw, j).Value = temp

render()

和你的<input type="file" onChange={(e) => this.handleFileUpload(e)} /> 处理程序:

onChange

答案 1 :(得分:0)

https://www.npmjs.com/package/react-firebase-file-uploader 这肯定会对你有用,因为我也使用了这个