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

@SharonStrats SharonStrats commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

I found this problem when i accidently selected main branch instead of staging and clicked on copilot review.

@timea-solid not sure if we should include it.

@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>
@timea-solid timea-solid moved this from In review to Done in SolidOS NLNet UI Nov 12, 2026

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: Done

Development

Successfully merging this pull request may close these issues.

Silently overwrite uploads

3 participants