Skip to content

show uploading files in conversation聽#2375

Closed

Description

@mahibi

uploading files should be shown in chat, including a progress indicator and a cancel button.

right now for files >1MB there is a notification with progress, for files <1MB there is no notification. for both big and small files, there should be a preview message in the chat while uploading.
maybe it makes sense to postpone this until #1552 is done.

Activity

  1. enakhala commented on Mar 7, 2024

    @enakhala

    1mb file are failing to upload with V18.0.1

  2. woolfg commented on Aug 7, 2024

    @woolfg

    Fully agree, there is a progress bar in the native Android Notification Panel (if you swipe down) but this is not visible in the app by default. UX wise this is quite confusing if you send a message with an attachment and you don't see any response in the UI after clicking the send button.

  3. woolfg commented on Aug 7, 2024

    @woolfg

    May be fixed by #3443

  4. ariedov commented on Aug 2, 2025

    @ariedov
    Contributor

    I don't think that is fixed, my wife sent me 3 cute pictures of my son instead of 1 because she did not understand that the picture was already sent.

    While I appreciate more cute pictures, it is also clear that a progress bar for uploads is missing.

  5. AndyScherzinger commented on Aug 2, 2025

    @AndyScherzinger
    Member

    Definitely still open, yes, @ariedov

  6. ariedov commented on Aug 4, 2025

    @ariedov
    Contributor

    I have looked into it, and there are a few things to consider. It's a big one.

    We treat the upload as a message (Telegram style)

    1. The upload status should be another chat message, but local to the device, no one else knows an upload is happening
    2. They have to survive state/activity changes
    3. This means that we should "fake" the storage of the upload messages, but also
    4. In case multiple uploads are happening and other messages appear, the order has to be preserved.
    5. Disabled replies to the upload message, which would be crazy to support.

    All uploads are a single popup.

    1. This is somewhat similar to the proposed solution before
    2. We do not block the UI and allow navigation
    3. Except we show a little snackbar at the top of the chat window, indicating the upload progress and the number of uploads
    4. Possibly a dialog shows up on the snackbar click, showing all pending uploads.

    One is not necessarily easier than the other, maybe a little, but they do have a very different feel. Not sure if I would be able to pull this off, it requires messing with a number of different systems of the app, potentially causing trouble. The app does feel incomplete without the feature though...

    Implementing upload-as-message

    I would do it as follows, mainly to avoid altering the existing data storage

    1. Create a new table for uploads
    2. Create a table entry for every new upload
    3. Alter the upload status from the UploadWorker
    4. Reflect the updated status from the ChatViewModel/ChatActivity/ChatRepository
    5. Sort the upload messages into the chat messages based on time (probably) in the ChatViewModel
    6. Remove the upload entry from the new table after the upload completes
    7. But store the upload failure status for reference, or potentially, retry
  7. mahibi commented on Aug 19, 2025

    @mahibi
    CollaboratorAuthor

    Thanks to have a look @ariedov
    Yes, it's a big one.

    UI wise, the upload should be treated as a message (and additionally a notification)

    On one hand, using a different DB table sounds good to sepeate things.
    On the other hand, it might make sense to use the chat messages table and make use of the isTemporary attribute which indicates pending messages.
    Then the same logic from OfflineFirstChatRepository#handleNewAndTempMessages could be applied to have the temporary upload messages sorted into the UI.
    I don't have a final opinion on this yet..

    If you are interested to delve deeper, just let us know and we can help out / discuss at any time.
    Implementing would be a bit easier if we already removed chatkit and switched to Jetpack Compose, this is unfortunately not done yet..

  8. mahibi commented on Aug 19, 2025

    @mahibi
    CollaboratorAuthor

    As a side note:
    I just had a look how Whatsapp and telegram do it when sending a video and also sending text messages before the upload finished:

    Whatsapp on sender side:
    the video is shown first, and after the text messages

    Whatsapp on receiver side:
    the text messages are shown first, and after the video

    This order remains different for sender and receiver even after a reload! (which could lead to misunderstandings depending on what is written).

    For Telegram it's the same but as soon the video uploaded, it's rearranged and also the sender side will see it below the sent messages. So the same order is seen for sender and receiver side.

    With the isTemporary handling in OfflineFirstChatRepository#handleNewAndTempMessages, the talk app would always rearrange a "uploading-message" so it's always below the sent messages at any time.

  9. ariedov commented on Aug 19, 2025

    @ariedov
    Contributor

    I started a bit of an investigation and created a new table for the uploads. Nothing is too late to change, but I still feel like messing with the messages would make this too hard to finish in a reasonable time. I want to implement a basic system that does not show uploads as messages, just shows that something is uploaded, and show you guys how it looks, so we can decide if that's okay or not.

    Life gets in the way though...

    So far I have:

    1. A new table for uploaded messages
    2. The Worker updating the table

    Needs to be done:

    1. A UI on the chat screen that listens to the db and updates the chat screen.
  10. mahibi commented on Aug 25, 2025

    @mahibi
    CollaboratorAuthor

    Thanks to have a further look @ariedov
    Sure, feel free to bring this to a state where we can discuss how to more forward. Just let us know when you need input from our side.

  11. codingPotato21 commented on Aug 30, 2025

    @codingPotato21

    Completely agree. I am currently having issues with this because uploading a video/photo doesn't show and makes it difficult to keep track.

    I think it is best to show it in the chat with a progress, the progress could be optional just status is really needed, to help with clarity as mentioned before the telegram/whatsapp may be the best style as people are used to it.

  12. ariedov commented on Sep 2, 2025

    @ariedov
    Contributor

    This is the draft PR I came up with. It doesn't really do much, and still took a ton of effort..

    #5317

    It just spits out all the updated files to a textview for the conversation, the progress update is not really implemented and there are no filters on the upload query, but it is a starting point still.

    @mahibi I'd appreciate a look and some comments. Thank you!

  13. mahibi commented on Sep 2, 2025

    @mahibi
    CollaboratorAuthor

    I might need some time to review as I'm busy with features for the next release.
    But it's no my list!

  14. ariedov commented on Sep 2, 2025

    @ariedov
    Contributor

    I would prefer having my previous contributions released to this, to be honest, so take your time. Thank you very much!

  15. AceDenghar commented on May 28, 2026

    @AceDenghar

    Hi,

    Any chance to have this?

    Thanks

  16. mahibi commented on Jun 5, 2026

    @mahibi
    CollaboratorAuthor

    Unfortunately this did not make it for 24.0.0.
    I will take a closer look if #6047 can be continued. Maybe it could be available for 24.1.0

  17. added this to the milestone on Jun 5, 2026
  18. modified the milestones: , 25.0.0 on Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions