Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions src/dtc_assets/src/Components/Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const Page = (props) => {
console.log('ArrayBuffer: ', arrayBuffer );
const uint8Array = Array.from(new Uint8Array(arrayBuffer));
console.log("Uint8Array being sent to backend: ",uint8Array);
actor.createPageEntryFile(
fileId,
chunkId,
return actor.createPageEntryFile(
fileId,
chunkId,
uint8Array
);

Expand All @@ -32,8 +32,8 @@ const Page = (props) => {
let promises = [];


while(chunk <= chunks - 1){
while(chunk <= chunks - 1){

const from = chunk * CHUNK_SIZE;
const to = from + CHUNK_SIZE;

Expand All @@ -45,7 +45,8 @@ const Page = (props) => {
chunk += 1;
};

await Promise.all(promises).then((result) => console.log(result));
const results = await Promise.all(promises);
console.log('Upload done', results);
};


Expand All @@ -67,11 +68,11 @@ const Page = (props) => {
</div>




</div>
);

};

export default Page;
export default Page;