Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

FS-4355: Dynamically set file url on open method #520

Merged
merged 3 commits into from
May 9, 2024

Conversation

tferns
Copy link

@tferns tferns commented May 7, 2024

Description

The component was designed to handle both single and multiple files but wasn’t properly tested with multiple files until HSRA. We found that the accept method was setting a global URL for every individual file upload, leading to race conditions where multiple files sometimes shared the same pre-signed URL.

The fix now assigns a unique upload URL directly to each file instead of using a global URL, solving this issue. We’ve also customized the XMLHttpRequest to use the unique URL for each file's upload if available, falling back to the default URL otherwise. This approach prevents the race conditions and ensures each file has its own upload URL.

@tferns
Copy link
Author

tferns commented May 8, 2024

Need to bump the version on this once all the other pending PRs are merged.

Copy link

@SophieOHagan99 SophieOHagan99 left a comment

Choose a reason for hiding this comment

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

LGTM

@tferns tferns merged commit ebdf0cc into main May 9, 2024
17 of 18 checks passed
@tferns tferns deleted the tferns-FS-4355-multiple-files-fix branch May 9, 2024 14:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants