mime

适用于PDF文件的MIME媒体类型

依然范特西╮ 提交于 2019-12-10 19:34:25
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 使用PDF时,我遇到了MIME类型 application/pdf 和 application/x-pdf 等。 这两种类型之间是否存在差异,如果是这样,它是什么? 一个比另一个更受欢迎吗? 我正在开发一个必须提供大量PDF的网络应用程序,我想以正确的方式进行,如果有的话。 #1楼 标准MIME类型是 application/pdf 。 该分配在 RFC 3778中 定义 ,即应用程序/ pdf媒体类型 ,从 MIME媒体类型注册表 引用。 MIME类型由标准机构 - 互联网号码分配机构 (IANA)控制。 这是管理根名称服务器和IP地址空间的组织。 x-pdf 的使用早于PDF的MIME类型的标准化。 x- namespace中的MIME类型被认为是实验性的,就像在 vnd. 命名空间被视为特定于供应商。 x-pdf 可能用于与旧软件兼容。 #2楼 来自维基百科媒体类型, 媒体类型由类型,子类型和可选参数组成。 例如,HTML文件可能被指定为text / html; 字符集= UTF-8。 媒体类型由顶级类型名称和子类型名称组成,其进一步构造为所谓的“树”。 top-level type name / subtype name [ ; parameters ] top-level type name / [

Domino R9.0.1 FP4: disable logging related to ImportConvertHeaders?

这一生的挚爱 提交于 2019-12-10 18:47:13
问题 Recently, we installed FP4, and now there are lots of messages on the console. It happens when a mailed document is opened or saved from a browser, using XPages. The rich-text fields in the mail are in MIME format. Lots of lines appear referring to ImportConvertHeaders, like: 25/06/2015 17:02:38,90 ImportConvertHeaders> Before ParallelList() 25/06/2015 17:02:38,97 ImportConvertHeaders> SendTo: > [cimpimsg.cpp, 2559] 25/06/2015 17:02:39,03 ImportConvertHeaders> After ParallelList() 25/06/2015

Does Java has any standard mechanism for uudecoding?

牧云@^-^@ 提交于 2019-12-10 18:00:15
问题 I was writing a Java program to download attachments from POP3 email. Originally I do this with getting an input stream of a MimePart if its content type is validated. And then I can simply write the input stream into a local file through a FileOutputStream. However, one thing I encountered is that, after I received an email with an attached file as its only content and access it, the mail (of type Message) only consists of a single part, which is of type text/plain. And its content consists

Python email lib - How to remove attachment from existing message?

ぐ巨炮叔叔 提交于 2019-12-10 16:45:31
问题 I have an email that I'm reading with the Python email lib that I need to modify the attachments of. The email Message class has the "attach" method, but does not have anything like "detach". How can I remove an attachment from a multipart message? If possible, I want to do this without recreating the message from scratch. Essentially I want to: Load the email Remove the mime attachments Add a new attachment 回答1: set_payload() may help. set_payload(payload[, charset]) Set the entire message

Check if a browser supports a specific MIME type?

送分小仙女□ 提交于 2019-12-10 16:34:06
问题 How can i check if the browser supports a specific mime type with php? 回答1: You could analyze the Accept header field to see if the type or a superset of that type is listed. But notice that Accept is a list of rated values and a quality value of 0 means not accepted. And browsers send different Accept values based on their expectations for that resource (e.g. a resource referenced in IMG element is expected to be an element of image/* ). 来源: https://stackoverflow.com/questions/2171809/check

How to send to BCC address when using PHPMailer to format MIME message for Gmail API?

徘徊边缘 提交于 2019-12-10 15:57:04
问题 I am using PHPMailer to build an email message. I am using PHPMailer only for MIME message formatting, not sending. I then extract the raw message from the PHPMailer object before passing it on to the Gmail API for processing. //Create a new PHPMailer instance $mail = new PHPMailer; //Tell PHPMailer to use SMTP $mail->isSMTP(); $mail->IsHTML(true); //Disable SMTP debugging // 0 = off (for production use) $mail->SMTPDebug = 0; //Set who the message is to be sent from $mail->setFrom(

What is the correct MIME type for a font file?

狂风中的少年 提交于 2019-12-10 15:26:33
问题 I have not been able to find a canonical source that indicates the correct MIME type for any and/or each type of file format. All the sources that I have found appear to contradict each other and/or the IANA MIME type RFCs and their associated list. While I am particularly interested in .otf (OpenType) and .ttf (TrueType) file types , an ideal answer would provide a canonical resource for determining the MIME types for a broad spectrum of font file formats, such as those listed on the Font

Nginx offers to download SVG instead of showing it

佐手、 提交于 2019-12-10 13:32:58
问题 I try to show SVG file in HTML or separate tab but Nginx offers me to download it. I took normal SVG file which works on another site but not in my server. Where is a problem? Here is an example http://proximax.ru/media/content/final/plane2.svg Also here SVG in HTML http://proximax.ru/index/ 回答1: The of your image is noted as application/octet-stream which a browser can only offer to download as it does not know how to interpret it. From your index.html file it is clear that you were playing

How do I add a MIME type to .htaccess?

岁酱吖の 提交于 2019-12-10 12:43:46
问题 I would like to add the following MIME type to a site run by Apache : <mime-mapping> <extension>jnlp</extension> <mime-type>application/x-java-jnlp-file</mime-type> </mime-mapping> That is the Tomcat format. I'm on a shared host, so I can only create an .htaccess file. Would someone please specify the complete contents of such a file? 回答1: AddType application/x-java-jnlp-file .jnlp Note that you might not actually be allowed to do that. See also the documentation of the AddType directive and

Image gets distorted sometime while uploading

牧云@^-^@ 提交于 2019-12-10 12:13:44
问题 I am using MIME multipart for uploading images to server. Sometime image get distorted. How to resolve this issue? Note: Distorted means, some pixels are lost. I am using following code for uploading: File file = new File(filePath[0]); HttpClient httpClient = new DefaultHttpClient(); HttpContext localContext = new BasicHttpContext(); HttpPost httpPost = new HttpPost("serverurl"); MultipartEntity entity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE); entity.addPart("Content-Type"