Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
add comment and change chunk size
Browse files Browse the repository at this point in the history
  • Loading branch information
geoknee committed Jul 5, 2023
1 parent cb01bb7 commit 2d3645f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/boost-demo/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import axios, { isAxiosError } from "axios";
import "./App.css";

function App() {
const numChunks = 10;
const numChunks = 3;
const length = 403507;

const [gotChunks, setGotChunks] = useState(new Array(numChunks).fill(false));
Expand Down Expand Up @@ -41,6 +41,8 @@ function App() {
setChunkGot(index);
file[index] = result.data;
} catch {
// TODO check that the status code is 206 Partial Content
// It could be 200 OK -- but then we may have the entire file already!
(e: any) => {
if (isAxiosError(e)) {
setErrorText(`${e.message}: ${e.response?.statusText}`);
Expand Down

0 comments on commit 2d3645f

Please sign in to comment.