Repository navigation
Fix/image upload - #816
Open
SharonStrats wants to merge 1 commit into
Open
Fix/image upload#816SharonStrats wants to merge 1 commit into
SharonStrats wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Image upload collision handling causes growing serial HEAD requests, can repeatedly retry an occupied URI after a 412, and aborts on unreadable linked photos instead of trying a fallback.
3 open issues
What changed in this PR
This PR protects profile photo uploads from overwriting existing resources, including images no longer linked from the profile.
Changes:
- Checks destination availability with HEAD requests and selects fallback filenames.
- Uses conditional PUT requests and retries after creation conflicts.
- Adds tests for occupied destinations and upload races.
| File | Description |
|---|---|
test/unit/mainPage/photoUpload.test.ts |
Tests destination collisions and conditional upload retries. |
src/components/profile-heading/editor/sections/heading/imageHelpers.ts |
Adds destination checks, conditional creation, and conflict retries. |
Review effort: Balanced
SharonStrats
force-pushed
the
fix/image-upload
branch
from
November 10, 2026 09:00
2cf3583 to
58e834b
Compare
Prompt: Fix the potential collisions with photo upload in imageHelpers. Co-authored-by: GPT-5.6 Luna <gpt-5.6-luna@openai.com>
SharonStrats
force-pushed
the
fix/image-upload
branch
from
November 10, 2026 09:02
58e834b to
c08bb8e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.