This is a large file uploader for the Form Service API, for considerations on how it works you can look at the architecture section. For a demonstration you can visit the links below.
Front-end is written in react: https://d1tox4tz6kpvtt.cloudfront.net/fileupload.html?case=C3D-123-9876
Where the case number has to follow that format: [3 digit uppercase alphanumeric]-[3 digit numeric]-[4 digit numeric]
At the moment you can write any code you want without any restrictions; however, the backend is coded to be strict to be strict in the case number format.
- The app will request an authorization (signature) token from the API.
- The API will request and generate the token from S3, and return it to the front-end. The API will have a preset file name it will expect.
- The the file name is sent back to the front end, along with the required authorization tokens.
- The front end will compile a request, add the tokens in the headers and upload the file to s3.
The app has been tested uploading a 1gb file on Wifi, it took about 15-20 minutes:
On a mac, you can create a large dummy file using the following command:
mkfile -n 1g ~/Desktop/testfile.mp4
The file will be empty, however you can adjust multiple file sizes: 2-3gb, etc.
Running the app
You can run the app using yarn start or npm start.