Skip to content

Conversation

@AlexAndBear
Copy link
Contributor

Description

Related Issue

  • Fixes <issue_link>

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the broken upload of space images by ensuring the file input is properly reset after an upload event.

  • Replaces resetting of the unwrapped ref value with a direct reset of the input element via event.currentTarget, ensuring that subsequent uploads work as expected.
  • Aims to address broken behavior observed in the image upload functionality.

const showModalImageSpace = (event: InputEvent) => {
const file = (event.currentTarget as HTMLInputElement).files[0]
unref(spaceImageInput).value = ''
;(event.currentTarget as HTMLInputElement).value = ''
Copy link

Copilot AI Jun 26, 2025

Choose a reason for hiding this comment

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

[nitpick] Instead of adding a semicolon before the assignment as a workaround for auto semicolon insertion, consider reviewing the surrounding code style to maintain consistency across the codebase. If the unref(spaceImageInput) reference is no longer used elsewhere, consider safely removing it to avoid redundancy.

Suggested change
;(event.currentTarget as HTMLInputElement).value = ''
(event.currentTarget as HTMLInputElement).value = ''

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

Thanks for the emergency fix 🚨 ❤️

@AlexAndBear AlexAndBear merged commit 921f95b into main Jun 26, 2025
20 of 22 checks passed
@AlexAndBear AlexAndBear deleted the fix-space-image-upload branch June 26, 2025 15:23
@openclouders openclouders mentioned this pull request Jun 26, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants