PoC React/.NET - Upload stream
🔬 Proof of Concept of an upload stream (multipart form data) from React JS and React Native app to C# .NET Core backend
Projects
This PoC is based on a .NET Core API & React JS & React Native mobile app project.
dotnet new React
If you want to build your own project, follow these steps:
dotnet new React
yarn install
yarn upgrade react-scripts --latest
yarn remove eslint eslint-config-react-app eslint-plugin-flowtype eslint-plugin-import eslint-plugin-js-ally eslint-plugin-react babel-eslint
npm install --save react@16.4.0 react-dom@16.4.0
References
The following references was used to build this POC:
- Creating a File Upload Component with React
- Creating a File Dropzone with React
- How to use Typescript with the ASP.NET Core 2.x React Project Template
- File uploads in ASP.NET Core
Run
Just open the solution in Visual Studio and run the project.
A browser instance should open in localhost, navigate to Upload tab, select one or more files to upload (drag & drop enabled) and then click on the Upload button.
*After the upload, you should click the Clear button to send the same file again (some error with id of the files might occour if this action is not done).