learningequality / learningequality/studio

Migrate web frontend uploads to the GCS resumable scheme

Open
#5,988 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DEV: backend DEV: frontend
Dominant language
Python
Stars
191
Forks
307
Avg merge
5d 6h
Merged PRs (30d)
10

Description

This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

Migrate the web frontend's upload paths from single-PUT to the opt-in GCS resumable scheme added in #5975, so interrupted uploads resume instead of restarting from byte 0.

Complexity: Medium
Target branch: unstable

Context

Two frontend sites single-PUT the whole file and skip upload when a HEAD on the storage URL returns 200:

#5975 has landed, so upload_url (with resumable: true) now returns either a definitive skip or a session URI, and the client no longer needs the HEAD check.

The Change
  • Pass resumable: true to upload_url; upload to the returned session URI in chunks (256 KiB multiples), resuming from the last persisted offset on interruption.
  • Apply to both upload sites.
  • On a definitive skip from upload_url, mark the file complete without uploading; remove the client HEAD-existence check.
Out of Scope
  • Removing single-PUT and the cutover (#5989).
  • The ricecooker client (learningequality/ricecooker#678).
Acceptance Criteria
  • Both upload sites pass resumable: true and upload to the session URI in 256 KiB-multiple chunks.
  • An interrupted upload resumes from the last persisted offset instead of restarting.
  • On a definitive skip from upload_url, the file is marked complete without uploading; the client HEAD check is removed.
References

AI usage

I used Claude (Opus 4.8) to draft this issue from the design established in #5975. I defined the scope and acceptance criteria, and verified the named upload paths against the current code.

Revised later with Claude (Opus 5) to put the #5975 prerequisite in past tense now that it has closed, and to resolve the bare out-of-scope references into issue links.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with uploadFileToStorage in contentcuration/frontend/shared/vuex/file/actions.js and contentcuration/frontend/shared/views/TipTapEditor/TipTapEditor/services/imageService.js, then read the resumable upload behavior from #5975. Verify both paths use resumable sessions with 256 KiB-multiple chunks, resume interrupted uploads, handle definitive skips, and no longer perform the client HEAD check.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, javascript
Domain
cloud, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.