Closed Bug 1606552 Opened 4 years ago Closed 3 years ago

Attachment urls are not returned from 'browser.messages.getFull'

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1550960

People

(Reporter: standard8, Unassigned)

References

Details

I'm trying to use the browser.messages.getFull API to get the urls of attachments so that I can display them.

When I use this API, I'm only getting the body for the main email, not the urls for the attachments.

For example, the email I'm looking at at the moment has this rough structure:

{
  contentType: "message/rfc822",
  parts: [{
    contentType: "multipart/mixed",
    parts: [{
      contentType: "multipart/alternative",
      parts: [{
        contentType: "text/plain",
        body: "Yay, a body!"
      }, {
        contentType: "text/html",
        body: "<html stuff..."
      }]
    }, {
      contentType: "image.jpeg",
      size: 3653748,
      name: "2019.jpg"
    }]
  }]
}

As this doesn't have the attachment urls, there doesn't appear to be any way to get attachment data from the APIs.

Updated for the fact I just realised that we were previously getting attachment urls using MsgHdrToMimeMessage from resource:///modules/gloda/mimemsg.js, not bodies.

I don't mind too much what we get, as long as it is something that can be used.

Summary: Attachment bodies are not returned from 'browser.messages.getFull' → Attachment urls are not returned from 'browser.messages.getFull'

Also, if we do let this return a URL, then we need to allow moz-extension scopes to access mailbox-message and other related urls.

See Also: → 1696777
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.