-
Notifications
You must be signed in to change notification settings - Fork 372
feat(llc)!: add standalone file/image upload/remove methods #2396
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
Conversation
This change introduces new methods to the `StreamChatClient` and `AttachmentFileUploader` for managing standalone file and image uploads and removals. Specifically, the following methods have been added: - `StreamChatClient.uploadImage`: Uploads an image to the Stream CDN. - `StreamChatClient.uploadFile`: Uploads a file to the Stream CDN. - `StreamChatClient.removeImage`: Removes an image from the Stream CDN. - `StreamChatClient.removeFile`: Removes a file from the Stream CDN. These methods are also implemented in the `AttachmentFileUploader` interface and its default implementation `StreamAttachmentFileUploader`. Additionally, new response types `UploadImageResponse` and `UploadFileResponse` have been added, aliasing `SendAttachmentResponse`.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v10.0.0 #2396 +/- ##
==========================================
Coverage ? 65.08%
==========================================
Files ? 421
Lines ? 26090
Branches ? 0
==========================================
Hits ? 16981
Misses ? 9109
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| **After:** | ||
| ```dart | ||
| class CustomAttachmentFileUploader implements AttachmentFileUploader { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we ask them to extend AttachmentFileUploader we can have the methods default to UnimplementedError, but it wouldn't be a breaking change if we add a method that they might not use directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup,make sense
|
Closing in favor of #2398 |
Submit a pull request
Fixes: FLU-165
Description of the pull request
This change introduces new methods to the
StreamChatClientandAttachmentFileUploaderfor managing standalone file and image uploads and removals.Specifically, the following methods have been added:
StreamChatClient.uploadImage: Uploads an image to the Stream CDN.StreamChatClient.uploadFile: Uploads a file to the Stream CDN.StreamChatClient.removeImage: Removes an image from the Stream CDN.StreamChatClient.removeFile: Removes a file from the Stream CDN.These methods are also implemented in the
AttachmentFileUploaderinterface and its default implementationStreamAttachmentFileUploader.Additionally, new response types
UploadImageResponseandUploadFileResponsehave been added, aliasingSendAttachmentResponse.