Skip to content

Fix/image upload - #816

Open
SharonStrats wants to merge 1 commit into
stagingfrom
fix/image-upload
Open

SharonStrats wants to merge 1 commit into
stagingfrom
fix/image-upload

Conversation

@SharonStrats

Copy link
Copy Markdown
Contributor

No description provided.

@SharonStrats
SharonStrats requested a balanced review from Copilot November 10, 2026 08:27
@SharonStrats SharonStrats self-assigned this Nov 10, 2026
@SharonStrats
SharonStrats changed the base branch from main to staging November 10, 2026 08:28
@SharonStrats SharonStrats moved this to In review in SolidOS NLNet UI Nov 10, 2026
@SharonStrats SharonStrats linked an issue Nov 10, 2026 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Prompt: Fix the potential collisions with photo upload in imageHelpers.

Co-authored-by: GPT-5.6 Luna <gpt-5.6-luna@openai.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Silently overwrite uploads

2 participants