Skip to content

Fix bug: upload file would meet issue when using local storage#674

Merged
zhou9584 merged 1 commit intomainfrom
zhoule/fixLocalStorageBug
Mar 3, 2025
Merged

Fix bug: upload file would meet issue when using local storage#674
zhou9584 merged 1 commit intomainfrom
zhoule/fixLocalStorageBug

Conversation

@zhou9584
Copy link
Contributor

@zhou9584 zhou9584 commented Mar 3, 2025

Description

#663

Linked GitHub issue ID:

Pull Request Checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Code compiles correctly with all tests are passed.
  • I've read the contributing guide and followed the recommended practices.
  • Wikis or README have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

If this introduces a breaking change for Hydra Lab users, please describe the impact and migration path.

  • Yes
  • No

How you tested it

Please make sure the change is tested, you can test it by adding UTs, do local test and share the screenshots, etc.

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Technical design
  • Build related changes
  • Refactoring (no functional changes, no api changes)
  • Code style update (formatting, renaming) or Documentation content changes
  • Other (please describe):

Feature UI screenshots or Technical design diagrams

If this is a relatively large or complex change, kick it off by drawing the tech design with PlantUML and explaining why you chose the solution you did and what alternatives you considered, etc...

@zhou9584 zhou9584 enabled auto-merge (squash) March 3, 2025 09:17
Copy link

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.

PR Overview

This PR fixes a bug where uploading a file to local storage caused issues by explicitly setting the response content type.

  • Added an import for MediaType.
  • Updated the @PostMapping annotation to include the produces attribute ensuring JSON responses.

Reviewed Changes

File Description
center/src/main/java/com/microsoft/hydralab/center/controller/StorageController.java Updated upload endpoint to produce JSON responses

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@zhou9584 zhou9584 merged commit 1db39ae into main Mar 3, 2025
7 checks passed
@zhou9584 zhou9584 deleted the zhoule/fixLocalStorageBug branch March 3, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants