Skip to content

Conversation

@xsahil03x
Copy link
Member

Submit a pull request

Fixes: FLU-165

Description of the pull request

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.

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`.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 25, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/new-attachment-upload

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Sep 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (v10.0.0@5a02491). Learn more about missing BASE report.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


**After:**
```dart
class CustomAttachmentFileUploader implements AttachmentFileUploader {
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup,make sense

@xsahil03x
Copy link
Member Author

Closing in favor of #2398

@xsahil03x xsahil03x closed this Sep 26, 2025
@renefloor renefloor reopened this Sep 26, 2025
@xsahil03x xsahil03x merged commit 4bb47e1 into v10.0.0 Sep 26, 2025
9 checks passed
@xsahil03x xsahil03x deleted the feat/new-attachment-upload branch September 26, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants