Monerh A#5
Open
Miuroro wants to merge 6 commits into
Open
Conversation
dilero
reviewed
Jul 7, 2026
| @@ -26,14 +27,18 @@ public ProductResponse setProductSize(int id, String size) { | |||
| } | |||
|
|
|||
| public ProductResponse setProductImage(int id, MultipartFile file) { | |||
There was a problem hiding this comment.
what happens if the file is null? No exception handling exist in this method.
dilero
reviewed
Jul 7, 2026
| new TypeReference<Map<String, Object>>() {})); | ||
| } | ||
| } catch (Exception e) { | ||
| throw new RuntimeException(e); |
dilero
reviewed
Jul 7, 2026
| logger.warning("Bucket connection skipped: " + e.getMessage()); | ||
| } | ||
|
|
||
| return "https://s3.eu-central-003.backblazeb2.com/file/" + bucket + "/" + key; |
There was a problem hiding this comment.
https://s3.eu-central-003.backblazeb2.com/file/ can be a constant.
There was a problem hiding this comment.
Extracting that URL into a constant (e.g. BASE_STORAGE_URL) helps because:
Single source of truth — if the bucket or region changes, you update one place, not hunt through 15 files
Readability — BASE_STORAGE_URL + path is clearer than a raw URL blob
Typo prevention — one misspelled character in a pasted URL is hard to spot; a misspelled constant name throws an error immediately
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.
Description
I have finished all three tasks for this assignment. The app runs smoothly, the endpoints work in Postman.
Changes
📝 Task 1: Setup
pom.xmlfile.🎨 Task 2: JSONB and Product Queries
detailsfield to the Product code so it shows up in requests.📁 Task 3: Image Upload & Delete
FileServiceto handle uploading and deleting images.S6242).ProductControllerto accept file uploads properly.null).Everything compiles and runs perfectly.
I fixed the PR issue by rebasing onto the correct repository. The code is all ready for review now!