I have a CGI script that prints the following on stdout:
print "Status: 302 Redirect\n";
print "Server: Apache-Coyote/1.1\n";
print "Location: $redirect\n";
print "Content-Length: 0\n";
print "Date: $date\n\n";
Where $redirect and $date are reasonable values. What Apache2 actually sends also includes a Content-Type: header (text/plain...
I created a custom field for a content type I am creating using the XML below.
<Field ID="{GUID}" Required="False" DisplayName="Likes" Name="Likes" Type="Number" SourceID="http://schemas.microsoft.com/sharepoint/v3"><Default>0</Default></Field>
The field is meant to be used as a counter of sorts, and will be incre...
I am trying to determine a file's mime type. I've tried a few methods, but haven't come up with anything that gives consistent output. I've tried $mime = mime_content_type($file) and $mime = exec('file -bi ' . $file). I am serving up images, CSS, and JavaScript.
Example mime_content_type() output:
jquery.min.js - text/plain
editor....
string fileName = "test.zip";
string path = "c:\\temp\\";
string fullPath = path + fileName;
FileInfo file = new FileInfo(fullPath);
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.Buffer = true;
Response.AppendHeader("content-dispositio...
Hi everyone,
I have some issues with a PHP file that is not working properly. The Content-type does not get recieved by any browser at all. Firebug interprets the file as text/html instead of css. Here's the file :
<?php
header('Content-Type: text/css; charset=UTF-8');
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 'On');...
Hi all
When saving documents to a Sharepoint document library having multiple content-types, office asks which content-type should be used:
Is there a way to customize this dialog to some degree?
I have seen that UI elements within Office such as the sharepoint document information panel can be customized using infopath. Is there a ...
I'm trying to download an InfoPath template that's hosted on SharePoint. If I hit the url in internet explorer it asks me where to save it and I get the correct file on my disk. If I try to do this programmatically with WebClient or HttpWebRequest then I get HTML back instead.
How can I make my request so that the web server returns th...
I think I have a bit of a chicken and egg problem. I would like to set the content_type of a file uploaded via Paperclip. The problem is that the default content_type is only based on extension, but I'd like to base it on another module.
I seem to be able to set the content_type with the before_post_process
class Upload < ActiveRecor...
I'm writing up some documentation on a Drupal project and my task is to define the content types and their attributes. The intended audience is project managers and developers. So it could be a high level document that gives an overview of the system. (I think that's how I describe it: high level rather than high detail)
At the moment I...
This is the code I wrote to reorder fields in a custom content type:
//get the content type
SPContentType listContentType = myList.ContentTypes[MyContentTypeName];
//get the field name to put first
string firstFieldName = myList.Fields[FirstFieldDisplayName].InternalName;
//get all field names in the content type
List<string> fieldNames...
Hi:
I Suddenly found that I have no idea about the concept of data format and the encoding.
For exmpale, what is the differences about the ascii/binary/base64/text-xml ?
For a real case, I am working with a web service whose parameter I have to define,however one of the parameter should be ascii,another is binary and the last is netcdf....
Hi all, I want a php page to 'display' a pdf. Here is the code:
<?php
header("Content-type: application/pdf");
readfile('Reportage - Berlin.pdf'); //tried echo(readfile(...)) as well
?>
Not very complicated I think, but somehow firefox cant detect that this is a pdf. This works in Safari but in firefox, i get a prompt to download...
I made this site for my friend and I uploaded it to an Amazon S3 bucket (http://ballard26.s3.amazonaws.com/index.html) and when I go to that site the page doesn't load correctly and I have no idea why. Any ideas?
For example, the stylesheet.css doesn't load correctly. If you go to http://ballard26.s3.amazonaws.com/stylesheet.css, it dow...
I am using the latest version of jqGrid: 3.6.4
This seems like a simple problem (or at least it did before I spent a few hours on it):
When the grid sends a request to the server (to a controller action), its content-type is always:
application/x-www-form-urlencoded; charset=UTF-8
and I would like it to be:
application/json; charse...
I am trying to get the CAML for a custom content type that I am creating. What I am really doing is creating the content type in Visual Studio 2010 via CAML and then deploying that content type to my sandbox using the new deploy features in VS 2010. At that point, I am modifying the content type using the SharePoint interface (i.e changi...
I have come across blogs about how to setup an external content type (e.g. http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/02/02/it-s-easy-to-configure-an-external-list-with-business-connectivity-services-bcs-in-sharepoint-foundation-2010.aspx) but I have not seen any examples of what to do when your external SQL DB has f...
I'm transferring fragments of HTML via Ajax. Safari (4.0.5) reports: "Resource interpreted as other but transferred with MIME type text/html."
The file name of the file I get has a .html extension. The server does set the header for this:
Content-Type:text/html
As I said, the content is a fragment of HTML, which is injected into the ...
Is it possible to make JSP pages not set any content type on response? In my setup, JSP doesn't directly generate the response, but rather an intermediate presentation, which is then processed by additional Java code that creates HTML or JSON based on that. So, can I somehow make JSP not set content-type on the response and leave it to...
Hi All,
How to get the Content-Type for any file in ObjectiveC ?
I can then set the "Content-Type" header while sending the file to any web server.
Thanks
...
Is there any java library that is similar to unix's command file?
ie:
$ file somepicture.png
somepicture.png PNG image, 805 x 292, 8-bit/color RGB, non-interlaced
The file command is such a nice tool. I need something that can tell me if the file is really what I want it to be. (ie a picture, document etc)
I know I can run the comm...