生成gmail附件url查看
Generate gmail-attachment url to view
我正在开发可以访问 g-mail.I 中所有图片的项目mail.I已经尝试使用可以获取所有必需 attachments.But 的节点的 G-mail API需要下载整个 image.I 可以使用 API.Is 访问附件 ID 和消息 ID 18=] 到我的项目中所需的图像。
我确实发现了这个相关问题,,您可能想尝试建议的解决方案。
您可以使用此方法获取电子邮件附件:
https://mail.google.com/mail/u/0/?ui=2&ik={ik_value}&view=att&th={message_id}&attid=0.{atachment_index}&disp=safe&zw
wherein, attachmment_index
is just the index of the attachment. If there are 3 attachments and you want to get the 3rd file, the index value will be 3
. This URL is a 302 header that acts like a link shortener for the download file. Opening this link will lead you to the attachment data
var ik = gmail.tracker.ik;
var id = gmail.get.email_id();
var aid = "1"; // gets the first attachment
var url = "https://mail.google.com/mail/u/0/?ui=2&ik=" + ik + "&view=att&th=" + id + "&attid=0." + aid + "&disp=safe&zw";
console.log(url);
我正在开发可以访问 g-mail.I 中所有图片的项目mail.I已经尝试使用可以获取所有必需 attachments.But 的节点的 G-mail API需要下载整个 image.I 可以使用 API.Is 访问附件 ID 和消息 ID 18=] 到我的项目中所需的图像。
我确实发现了这个相关问题,
您可以使用此方法获取电子邮件附件:
https://mail.google.com/mail/u/0/?ui=2&ik={ik_value}&view=att&th={message_id}&attid=0.{atachment_index}&disp=safe&zw
wherein,
attachmment_index
is just the index of the attachment. If there are 3 attachments and you want to get the 3rd file, the index value will be3
. This URL is a 302 header that acts like a link shortener for the download file. Opening this link will lead you to the attachment data
var ik = gmail.tracker.ik;
var id = gmail.get.email_id();
var aid = "1"; // gets the first attachment
var url = "https://mail.google.com/mail/u/0/?ui=2&ik=" + ik + "&view=att&th=" + id + "&attid=0." + aid + "&disp=safe&zw";
console.log(url);