Content Type for MHT files
What is the content type for MHT files? ...
What is the content type for MHT files? ...
How does one reliably determine a file's type? File extension analysis is not acceptable. There must be a rubyesque tool similar to the UNIX file(1) command? This is regarding MIME or content type, not file system classifications, such as directory, file, or socket. ...
Hello, I'd like to use the field type RichHTML in a custom content type that I'm making. However, I think that the RichHTML type comes with MOSS Publishing so I'm unsure how to add it to my content type. Right now I've tried with this: <Field ID="{7F55A8F0-4555-46BC-B24C-222240B862AF}" Type="RichHTML" Name="NewsBodyField" DisplayName="...
I'm downloading some images from a service that doesn't always include a content-type and doesn't provide an extension for the file I'm downloading (ugh, don't ask). What's the best way to determine the image format in .NET? The application that is reading these downloaded images needs to have a proper file extension or all hell breaks...
So what I'm trying to do here is get the headers of a given URL so I can determine the mime-type. I want to be able to see if http://somedomain/foo/ will return an html document or a jpg image for example. Thus, I need to figure out how to send a HEAD request so that I can read the mime-type without having to download the content. Does a...
I had defined a custom content type, and I am trying to define a filtered lookup column. I can select the list from where to pick up the column I need, but I can't find any example of the needed format of query string. I can filter the list manually by appending "?FilterField1=columnName&FilterValue1=myValue" to the list URL. Where can ...
Right now I have a visual studio project which contains a custom content type that I made. It also contains all the necessary files for making a sharepoint solution (wsp) file and a script to generate this. Now, I would like to do 2 things. First, I'd like to create a custom display form for the content type and include it in my solu...
I am developing a Joomla component and one of the views needs to render itself as PDF. In the view, I have tried setting the content-type with the following line, but when I see the response, it is text/html anyways. header('Content-type: application/pdf'); If I do this in a regular php page, everything works as expected. It seems tha...
Ok, so I have an index.php file which has to process many different file types. how do I guess the filetype based on the REQUEST_URI. If I request http://site/image.jpg, and all requests redirect through index.php, which looks like this <?php include('/www/site'.$_SERVER['REQUEST_URI']); ?> How would I make that work correctly? ...
I'm specifying my doctype as xhtml strict, but it's being sent over the wire as a content type of text/html. I'd like to specify that the content type is application/xhtml+xm, but I can't figure out where, or if, I can configure this from within my application ...
Actually, I'm using this way. Do you have a better way? private bool AcceptJson(HttpRequest request) { const string JsonType = "application/json"; if (request.ContentType.ToLower(CultureInfo.InvariantCulture).StartsWith(JsonType)) { return true; } if (request.AcceptTypes.Select(t => t.ToLower(CultureInfo.In...
Are there official MIME types for the .cs (C# source), .resx, .aspx, etc. files in a .NET project? If no official types are defined, any recommendations on good MIME types? This will be exposed via Apache and the mod_dav_svn module when viewing a Subversion repository from a web browser, so anything that'll help Firefox et al render th...
We have a weird intermittent problem with saving from Word 2007 to our SharePoint 2007 (MOSS) document libraries that gives a dialog box that never goes away - it is titled "Content Types" and the message "Getting list of available content types..." with a green progress-type bar that keeps scrolling. It happens a lot on our training ser...
I have a content type that has required fields. I have associated Word document with the content type as a template. I now want to edit the Word template, but word won't allow me to save the template without filling in the required fields. However, if I fill in the required fields and save the document, then those fields get populated...
When working with PDFs, I've run across the MIME types 'application/pdf' and 'application/x-pdf' among others. Is there a difference between these two types, and if so what is it? Is one preferred over the other? I'm working on a web-app which must deliver huge amounts of PDFs and I want to do it the correct way, if there is one. ...
I've just set up mod python with apache and I'm trying to get a simple script to work, but what happens is it publishes all my html as plain text when I load the page. I figured this is a problem with mod_python.publisher, The handler I set it too. I searched through the source of it and found the line where it differentiates between 't...
In my previous question, I was accidentally sending token/value pairs with an text/xml content-type which resulted in nothing being sent. Tim C's insight into that problem was extremely helpful. Thanks again, Tim!Looking back at the original sending code, I now realize that the setting of the ServerXMLHTTP's content-type to text/xml wa...
Is there anyway to change the content-type of an XML document, in the XML document? I'm working with a really old system that passes back HTML (and we are trying to make it return XML). I'm retrieving it from XMLHttpRequest, and I noticed using netcat that it isn't passing back any content-type headers. When I receive the XMLHttpRe...
I've written a PHP script that handles file downloads, determining which file is being requested and setting the proper HTTP headers to trigger the browser to actually download the file (rather than displaying it in the browser). I now have a problem where some users have reported certain files being identified incorrectly (so regardles...