Fix file uploads to honor updateEndpoint configuration setting - #209
Merged
grantcopley merged 2 commits intoSep 24, 2025
Merged
Conversation
Co-authored-by: grantcopley <1197835+grantcopley@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] File uploads do not honor the setting set in the 'updateEndpoint' configuration setting.
Fix file uploads to honor updateEndpoint configuration setting
Sep 24, 2025
grantcopley
approved these changes
Sep 24, 2025
grantcopley
left a comment
Collaborator
There was a problem hiding this comment.
@copilot Looks great
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.
Fixes an issue where file uploads would not respect the
updateEndpointconfiguration setting, causing uploads to use hardcoded paths instead of the configured endpoint pattern.Problem
When a custom
updateEndpointis configured (e.g.,/index.bxm/cbwire/update), file uploads would still use the hardcoded/cbwire/uploadpath instead of deriving the correct upload endpoint (/index.bxm/cbwire/upload) from the configuration.This created inconsistency where:
http://127.0.0.1:54220/index.bxm/cbwire/updatehttp://127.0.0.1:54220/cbwire/uploadhttp://127.0.0.1:54220/index.bxm/cbwire/uploadRoot Cause
The
generateSignedUploadURL()method inCBWIREController.cfcwas hardcoding the upload path:Solution
Added
getUploadEndpoint()method - Derives the upload endpoint from the configured update endpoint by replacing/updatewith/uploadUpdated
generateSignedUploadURL()method - Now uses the derived endpoint instead of hardcoded path:Behavior
updateEndpoint = "/cbwire/update"→ upload endpoint ="/cbwire/upload"updateEndpoint = "/index.bxm/cbwire/update"→ upload endpoint ="/index.bxm/cbwire/upload"The fix maintains backward compatibility while ensuring file uploads respect the same routing configuration as update requests.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
downloads.ortussolutions.comcurl -fsSL REDACTED(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Fixes #207
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.