Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: multiple image upload issue using native image picker and generic improvements for upload #2638

Merged
merged 5 commits into from
Aug 30, 2024

Conversation

khushal87
Copy link
Member

@khushal87 khushal87 commented Aug 28, 2024

🎯 Goal

The goal of the PR is to primarily solve the multiple image upload issue on the new architecture but this also applies to the current v5 branch as the improvements here make sense and are not architectural dependant.

There are a few improvements in the useEffect of the MessageInput as well that is supposed to target only the media library(attachment picker) but don't make sense for the native image pickers, so proper checks are added around the same and improves the upload process for normal use-cases.

The PR also solves the issue of clicked images not respecting the file size config check.

☑️ Checklist

  • I have signed the Stream CLA (required)
  • PR targets the develop branch
  • Documentation is updated
  • New code is tested in main example apps, including all possible scenarios
    • SampleApp iOS and Android
    • Expo iOS and Android

@Stream-SDK-Bot
Copy link
Contributor

Stream-SDK-Bot commented Aug 28, 2024

SDK Size

title develop branch diff status
js_bundle_size 438.6728515625 KB 439 KB 0 B 🟢

Comment on lines 407 to 408
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedFilesLength]);
Copy link
Member

Choose a reason for hiding this comment

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

same here

Copy link
Contributor

@isekovanic isekovanic left a comment

Choose a reason for hiding this comment

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

Aside from what Oli and Santhosh already mentioned, looks good to me ! When those are fixed we can go ahead with this 🚀

await uploadFilesHandler();
} else {
/** User de-selected a video in bottom sheet attachment picker */
removeFilesHandler();
Copy link
Contributor

Choose a reason for hiding this comment

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

This also covers the case where selectedFilesLength === fileUploadsLength, is this the desired behaviour ? Just curious about this, not a remark

@khushal87 khushal87 marked this pull request as draft August 29, 2024 11:04
@khushal87 khushal87 marked this pull request as ready for review August 29, 2024 15:04
@khushal87 khushal87 merged commit 0b9f18a into develop Aug 30, 2024
7 checks passed
@khushal87 khushal87 deleted the PBE-5753-upload-image-issue-native-picker branch August 30, 2024 09:24
@github-actions github-actions bot mentioned this pull request Sep 4, 2024
6 tasks
@stream-ci-bot
Copy link
Contributor

🎉 This PR is included in version 5.36.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

6 participants