content-type

proper model for side storage in SharePoint?

We'd like to build a custom type - or simply add custom columns to an existing type - that can be displayed in regular lists (or document library) without requiring a special page or grid view. This column retrieves complex/structured data from an external service and exposes it as the column's "value". I realize that this will prevent...

How do you add custom menu actions programmatically in SharePoint?

I need to add a custom menu action to a custom content type programmatically in c#. This is because I will not know the URL I need to link to beforehand. The URL to link to will be pulled from configuration when the feature is activated. I have tried the following: Added the CustomAction in my Element.xml file as: <CustomAction I...

How does browser know the content type when such header is not specified?

Hello, if the server doesn't send the content-type header, how does the browser tell which kind of content he got? For example, when I get the SO logo with chrome, the image is intact, though the server doesn't state its extension (at least, explicitly) ...

Change the content type of a pop up window.

This question brought a new one: I have a html page and I need it to change the content type when the user press "save" button so the browser prompt to save the file to disk I've been doing this in the server side to offer "excel" versions of the page ( which is basically a html table ) <c:if test="${page.asExcelAction}"> <% ...

Web Part with a custom property bound to a "choice" field from a content type?

I'm trying to make a custom property for a WebPart. The custom property should be a drop down with choices coming from a "choice" column from a content type. Is that even possible? ...

Preserving content-type when posting a file from iPhone to Rails

I am posting a .zip file from the iPhone to a Rails server using an NSURLRequest. The problem is that the content-type of the zip file is lost in-transit. When I upload the same zip file from a web-browser to Rails, the content-type is preserved. This leads me to believe it's related to the way I'm sending it from the iPhone. Does anyone...

Is there a way to filter unsupported formats in the routes file?

I have a Rails app that's getting hit by ScanAlert calling /login.php, but the app is throwing a 500. I'd like to filter any format that's not supported by my site, and 404 instead. My original inclination was to create a before_filter in application_controller.rb that removes any :format that's not :html, :xml, or :js, then render 404....

How do I get IE6 to take ContentType seriously?

I'm fighting with a third-party ActiveX control that we are using to load TIFF images into the client browser from an ASP.Net(3.5) web form. The ActiveX control registers itself correctly (as far as I can tell) as the MIME handler for TIFF images and works correctly every time a file is double-clicked locally. However, IE6 and the Acti...

Cascaded ListBoxes using SPFieldMultiChoice - issue defaults to default Content type

I wound up modifying the source from a publically posted POC: http://datacogs.com/datablogs/archive/2007/08/26/641.aspx, which is a custom field definition for cascading drop downs. The modifications were to allow parent-child list boxes where a user can multiselect for filtering and selecting the values to be written back to a SharePoin...

Categorizing non-ID categories PHP loop

On my project there're various search results of different content-types. For unimportant reasons, not all content-types carry a unique ID. However, I tried to write this loop that will detect IDless content-types, and will give them a unique ID. Basically, the results look like this: Category ID 3 Category ID 3 Category ID 4 NON-ID C...

Drupal6: Content Access Permissions can't be rebuilt

I created a new content type, so it wants me to rebuild content permissions. I clicked the link to do so. It progressed through but seemed to get hung up towards the end. It stayed in the same position for 20 minutes, so hit refresh. I got the following error message: The content access permissions have not been properly rebuilt. What ...

Content-Type and Representations

What is the common convention for supporting multiple representation (e.g. html, json, xml) for resources (e.g. blog, user) in django? First, I don't know how I should format my urls. For example, what your take on using either of these urls to request xml format /<resource>.<format>, e.g. /blogs/123.xml /<format>/<resource>, e.g. /x...

Deploy 3 ContentTypes using 1 Feature - Only 2 gets deployed.

Hello. I have a feature which has following manifest file that defines multiple content types: <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt; <ContentType ID="0x01008e5736f1388b4809a9f102da1e573ddb" Name="$Resources:Balticovo,ContentType_AgendaName" G...

How to get ContentType for file in ASP.NET MVC when using File Action Method

Hi there, Attempting to use asp.net mvc's Action Result of File. So it would seem that I have to specify a ContentType for the file to be sent to the browser. Currently there is no real limit to what types of files may be sent to the browser in my application, so I can't always assume it will be a "text/pdf", for example. What's the b...

How to set WebClient Content-Type Header?

To conect to a third party service I need to make a Https Post. One of the requisites set is to sent a custom content type. I'm using WebClient, but I can't find how to set it. I've tried making a new class and overriding the CreateRequest Method, but that make request crash. Is there any way to do that without having to rewrite CopyHe...

Why http post parameter dissapears after Content-Type changed?

I'm making an http post to an url. When using WebClient or WebRequest it all works fine, unless I change the WebRequest.ContentType propertie. What I'm missing here? As suggested here I'm trying this: using (WebClient client = new WebClient()) { NameValueCollection fields = new NameValueCollection(); fields.Add("q...

File extensions and MIME Types in .NET

I want to get a MIME Content-Type from a given extension (preferably without accessing the physical file). I have seen some questions about this and the methods described to perform this can be resumed in: Use registry information. Use urlmon.dll's FindMimeFromData. Use IIS information. Roll your own MIME mapping function. Based on thi...

How to know the ContentTypeId of a content type made with the Sharepoint interface?

I am working on a workflow in VS which creates a task with content type. The content type I want to use is a custom content type made with the SharePoint interface. Is there a way to know this content type's Id so I can use it in my workflow? If not; is there an alternative how to initiate a task containing this content type with my w...

Is Content-Type meta tag important if responce headers include content-type?

At the moment we set content-type in our responce headers, a bit like this... Content-Type text/html; charset=utf-8 We also have this at the top of html pages... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" ...

is there a way to generate a Content-Type header from a file extension in Java?

I have a Java application which sometimes has to generate a Content-Type header from a filename alone. Is there a way to estimate the Content-Type for common extensions? (e.g. ".pdf" maps to "application/pdf", etc) ...