我尝试SomeAddOnName.MessengerCompose.filePathCurrent
使用以下说明删除我知道他在 var 中的路径的特定附件:
//Construct reference attachment
var fileAttachmentBefore = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsIFile);
fileAttachmentBefore.initWithPath(SomeAddOnName.MessengerCompose.filePathCurrent);
var attachmentBefore = FileToAttachment(fileAttachmentBefore);
//Remove attachment
gMsgCompose.compFields.removeAttachment(attachmentBefore);
gMsgCompose.compFields.attachments
但无论我在邮件作曲家做什么,它都不起作用并且仍然是空的。
有谁知道我必须做什么?
谢谢