Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continue file upload #1012

Merged
merged 10 commits into from
May 29, 2024
Merged

Continue file upload #1012

merged 10 commits into from
May 29, 2024

Conversation

jrchudy
Copy link
Member

@jrchudy jrchudy commented May 7, 2024

The changes made in this PR for ermrestJS better communicate the status of the current upload job after each chunk is successfully uploaded and resuming an upload job if there is a pending one tracked locally that is verified by the server.

The changes include:

  • adding a chunkTracker for tracking which chunks in chunks[] are marked as complete determined by chaise which manages the local upload state
  • store the startChunkIdx for initializing chunkTracker and initializing the upload progress on resume
  • upload.prototype.fileExists accepts a jobUrl parameter that it will use as the chunkUrl if a 409 is returned when checking if the file exists (more details in the comments in the code)
  • upload.prototype.start accepts a startChunkIdx to initialize chunkTracker and for skipping which chunks are added to the chunkQueue to avoid re-uploading chunks that already exist for this upload job
  • Chunk.prototype.sendToHatrac will update chunkTracker when each chunk has finished uploading

These changes resolve step 1 of issue #2379 in chaise

@jrchudy jrchudy added the hatrac Anything related to hatrac/uploader label May 7, 2024
@jrchudy jrchudy self-assigned this May 7, 2024
@jrchudy jrchudy requested a review from RFSH May 8, 2024 23:45
@jrchudy jrchudy merged commit 6e1dc80 into master May 29, 2024
1 check passed
@jrchudy jrchudy deleted the continue-upload branch May 29, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hatrac Anything related to hatrac/uploader
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant