如何设置应用程序/ vnd.apple.pkpass的mime类型,以便通过链接或电子邮件共享传递 [英] How to set mime type of application/vnd.apple.pkpass in order to share pass by link or email

查看:407
本文介绍了如何设置应用程序/ vnd.apple.pkpass的mime类型,以便通过链接或电子邮件共享传递的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是创建一个应用程序和一个传递,所以我可以在iPod中添加传递到存折。但是我无法通过电子邮件分享传递或从Web服务器链接。通过我从apple上读到的文档,我需要添加mime类型作为application / vnd.apple.pkpass。但是,我不清楚我应该采取的步骤。我不怎么用mime类型。我不知道怎么做。因此,你知道如何添加这个mime类型以便使用来自web服务的传递吗?

I just create an app and a pass, so I can add pass to passbook in iPod. But I cannot share pass by email or link from web server. By the documents I read from apple, I need to add mime type as application/vnd.apple.pkpass. However, I don't understand clearly for the steps I should do. I don't how to use mime type. I don't know how to do it. Thus, do you know how to add this mime type in order to use pass from web service ?

推荐答案

Apache

将以下行添加到:


  • .htaccess 在.pkpass服务目录中,或

  • mime.types 文件,或

  • 到您的appache httpd.conf 或virtuatl服务器 .conf file

  • the .htaccess in the directory serving your .pkpass, or
  • to the mime.types file, or
  • to your appache httpd.conf or virtuatl server .conf file

然后重新启动Apache(如果添加到 .htaccess 则不需要)

Then restart Apache (not required if adding to .htaccess)

AddType application/vnd.apple.pkpass    pkpass






nginx

添加以下内容一行到您的 mime.types 文件并重新启动nginx

Add the following line to your mime.types file and restart nginx

application/vnd.apple.pkpass    pkpass;






IIS


  1. 打开IIS管理器并导航到要管理的级别。

  2. 在功能视图中,双击MIME类型。

  3. 在操作窗格中,单击添加。

  4. 在添加MIME类型 .pkpass

  5. 类型应用程序.vnd.pkpass n MIME文本框

  6. 单击确定

  7. 重新启动IIS

  1. Open IIS Manager and navigate to the level you want to manage.
  2. In Features View, double-click MIME Types.
  3. In the Actions pane, click Add.
  4. In the Add MIME Type .pkpass
  5. Type application.vnd.pkpass n the MIME text box
  6. Click OK
  7. Restart IIS






如果您通过脚本提供文件并且无法编辑您的Web服务器配置,您可以添加以下内容在发送任何内容之前的行:


If you are serving your file via a script and are not able to edit your web server config you could add the following line before any content is sent:

PHP

header('Content-Type: application/vnd.apple.pkpass');

C#

WebClient client = new WebClient();
client.Headers.Add("Content-Type", "application/vnd.apple.pkpass");

这篇关于如何设置应用程序/ vnd.apple.pkpass的mime类型,以便通过链接或电子邮件共享传递的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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