Closed Bug 1669828 Opened 4 years ago Closed 4 years ago

compose.updateAttachment doesn't trigger cloudFile event(s)

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1669829

People

(Reporter: je, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

  1. Add an attachment to a message
  2. Upload the attachment to a Filelink provider ("Convert to ..." in the attachment's context menu).

=> The file is uploaded and the download URL is inserted into the message.

  1. Change the attachment from an Addon using messenger.compose.updateAttachment().

Actual results:

a) The attachment is changed:

  • Itappears to be local in the message again
  • It has the name and contents supplied in compose.updateAttachment
    b) The URL to the uploaded, original attachment is still in the message
    c) The URL points to a file with the old name and contents
    d) If you remove the attachment from the attachments list, the URL of the old file is removed from the message.
    e) If you send the message, the changes by compose.updateAttachment are lost: the message is sent without the new attachment. Instead it contains a dummy, pointing to the uploaded (old) attachment.

The sender does not know that she sent the old attachment, not the updated one.

Expected results:

The uploaded attachment should change according to the changes by compose.updateAttachment: Rename and/or upload new file to the cloud.
This could be acheived by triggering the cloudFile.onFileDeleted and cloudFile.onFileUpload events.

  • or -

The uploaded file and the URL should be removed and the attachment should be treated as a new, local attachment.
This would be the equivalent of selecting "Convert to normal attachment" from the attachment's context menu following by the changes, still resulting in a cloudFile.onFileDeleted event.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.