compose.updateAttachment doesn't trigger cloudFile event(s)
Categories
(Thunderbird :: Add-Ons: Extensions API, defect)
Tracking
(Not tracked)
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:
- Add an attachment to a message
- 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.
- 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.
Reporter | ||
Updated•4 years ago
|
Description
•