mailto:附件链接 [英] mailto: link with attachment

查看:117
本文介绍了mailto:附件链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的客户制作了一个应用,该应用提供了具有以下示例结构的zip文件:

  index.html/文件/文件.pdf/inc/style.css 

基本上,用户将使用名为Sites-2-Go的应用将zip文件传输到iPad或iPhone上.此时,他们可以使用iOS浏览器打开index.html文件,并显示列出zip中所有文件的页面.他们可以单击一个链接,它将打开文件文件夹中的文件.

之所以这样做,是因为我们公司的销售人员可以在iPad上四处展示我们公司的产品,而不必连接到互联网.它基本上是已经在线可用的离线版本.

无论如何,我的问题是:我的老板希望能够单击index.html页面上列出的任何文件旁边的电子邮件链接,并将其附加到准备发送的新电子邮件中.

我一直在研究以下语法:

mailto:johndoe@gmail.com?subject = Test& body = Test& attachment = files/file.pdf

但是显然由于安全原因,"attachment"参数实际上从未起作用.

我想知道这里是否有人知道一些解决方法?

解决方案

为什么不按照Dennis的建议链接到它,但是要包含用户名和密码.您可以像这样链接到它们:protocol://username:password @ URL.如果它是文件所在的FTP服务器,请像这样链接到它: ftp://client001:a67b1f@nuk.eu .如果它是HTTP服务器(Web服务器)所在的文件,则按如下所示链接到它: http://client002:f677gj @nuk.eu .Safari应该支持此功能,因为它是浏览器的主要功能.您使用apache服务器(大多数)上的.htpasswd文件创建用户名和密码.如果您想要一个用户名&对于每个客户,您可以使用一个非常长的随机字符串作为用户名和另一个密码,例如: http://sch7898gdgoj0o05klfckg021167pr0n:45906igfd49ps316fyh1zagf364z@peanutbutter.org 例如:

  mailto:johndoe@gmail.com?subject = Test& body =%3ca + href +%3d +%22http%3a%2f%2freadonlyclient%3aa7d56a8fd4h9863%40mycompany.com%22%3eDownload + File%3c%2fa%3e 

如果您想知道,那就是 URL编码.

I made an app for my client that delivers a zip file with the following example structure:

index.html
/files/
    file.pdf  
/inc/
    style.css

Basically, the user will transfer the zip file onto their iPad or iPhone using an app called Sites-2-Go. At this point, they are able to open the index.html file using the iOS browser, and a page listing all the files in the zip is shown. They can click on a link, and it will open the files located in the files folder.

The reason for doing this was so the Sales people at our company could go around showing our company's products on there iPad without having to connect to the internet. It's basically an offline version of something already available online.

Anyway, my question is the following: My boss would like to be able to click on an email link beside any of the files listed on the index.html page, and have it be attached to a new email ready to be sent.

I have been looking into the following syntax:

mailto:johndoe@gmail.com?subject=Test&body=Test&attachment=files/file.pdf

but apparently the "attachment" parameter has never actually worked due to security reasons.

I was wondering if anyone here knew of some workaround to this?

解决方案

Why not, as Dennis suggested, link to it, but with the username and password included. You can link to them like this : protocol://username:password@URL . If it's an FTP server the file's on, link to it like this: ftp://client001:a67b1f@nuk.eu . If it's a HTTP server (web server) the file's on, link to it like this: http://client002:f677gj@nuk.eu . Safari should support this since it's a main feature of browsers. You make usernames and passwords with a .htpasswd file on apache servers (the majority). If you wanted one username & pass for every client, you could use a really long random string for the username and another the password, like: http://sch7898gdgoj0o05klfckg021167pr0n:45906igfd49ps316fyh1zagf364z@peanutbutter.org For example:

mailto:johndoe@gmail.com?subject=Test&body=%3ca+href+%3d+%22http%3a%2f%2freadonlyclient%3aa7d56a8fd4h9863%40mycompany.com%22%3eDownload+File%3c%2fa%3e

If you're wondering, that's URL encoded.

这篇关于mailto:附件链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆