content-type

Hide inherited fields in new content types

I am trying to hide PercentComplete (% Complete) field in my custom content type that inherits from Workflow Task content type. And I am trying to do this with a feature. I am using the ID of PercentComplete field in FieldRefs element and setting ShowInDisplayForm to FALSE to no avail. Do I have to use a feature receiver and do it progr...

Handling variety of content types in the persistence layer.

Hello. In my site, I'll be inviting people to contribute variety of content, like pictures, video, and things alike. Besides the core content, I'll be capturing meta data. Some meta data will be common across content types and some will be specific. I am planning to have 1 table that accommodates universe of meta data with that many c...

Firefox not handling content type correctly when using IHttpHandler

Firefox is for some reason not properly handling content sent through my .NET HTTP handler; it appears to be not honoring the content type header. Rather, it sees the content as being HTML. The URL mapped to the request even has a .csv extension. Internet Explorer and Chrome are doing the right thing. The problem is happening for bot...

Unreadable Characters in Word After Export

I have an asp.net page that exports some data to Microsoft Word 2003. The source of the data is what users have typed into an ajax control toolkit HtmlEditor on an input page. All works well unless the user has pasted text from a Word document into the HtmlEditor. The html that is copied from Word looks like this: <p class="MsoBody...

Zope / Plone 3 product uninstsall issue

Hey all, I uninstalled a content type that I'd previously added and afterward I'm still getting a warning of 2010-01-06 22:43:50 WARNING OFS.Uninstalled Could not import class 'myclass ' from module 'ns.archetype_name.content.content_type_name' It isn't resulting in obvious problems, but it concerns me since I thought I'd uninstalled...

Jsp, Jquery and Json encoded characters issue

Working with JSON is quite new to me, yet I already like it. But i'm facing an annoying issue. Here's how things work: jquery makes an Ajax request for a specific url, this url is a STRUTS action, and, on success, returns a specific jsp this jsp includes JSON taglib (http://www.atg.com/taglibs/json) in order to render proper JSON formatt...

I am looking for something similar to the drupal CCK, but in Java (in a Java CMS)?

I have been using drupal, but I am constantly hitting its limitations. the drupal CCK (and associated modules) is a cool module in Drupal which allow you to specify new "content types" and add fields to them such as Images, text, check-boxes. Drupal then generates pages to add/edit and display these content types on the web. Obviously th...

How to set the Content-Type header using JavaScript

Hey, How can you set the Content-Type header to "application/x-www-form-urlencoded; charset=UTF-8" using JavaScript? I need to do this so I can view a form with french characters without generating errors. Thanks ...

Deploying a content type and site columns with a WSP in MOSS

I'm looking for a clean, and repeatable, solution to deploying custom site columns and content types to MOSS using a WSP. I've currently split up my product into two Visual Studio solutions. The first contains the code itself where the second will contain the XML files required to describe the site columns and content types. ...

QWebView get content type

When I click on a link in a QWebView I need to perform some actions based on the MIME type of that link. Obviously when I click on the link QWebView tries to navigate there, but how do I get the content type after this? ...

ASP.NET, determine if a request content type is for JSON

I'd like to implement an extension method IsJsonRequest() : bool on the HttpRequestBase type. In broad terms what should this method look like and are there any reference implementations? This is a private API. Edit: Suggestion; check if the x-requested-with header is "xmlhttprequest"? ...

PHP: how to serve right content-type (depending on file extension?)?

I'm using the scripts below to gzip some CSS and JS files. It works nice - except for serving JS files with the wrong content-type (and not the appropriate application/x-javascript). How could I improve the PHP code in order to serve the right content-type? Thanks! .htaccess: AddHandler application/x-httpd-php .css .js php_value auto_p...

Browser treating real file differently than servlet-generated file

I have an application that uses html5 to let the user listen to some audio samples on the server. If I specify the path to an actual audio file on the server, things work as expected: <audio src="/audio/english/banana_1.mp3" controls> Your browser does not support the <code>audio</code> element. </audio> However, if I point to a ...

Where can I get the list of most common file extensions and their content type?

So far I have: doc, dox -> application/ms-word xls, xlsx -> application/ms-excel pdf -> application/pdf And so on. Is there a place where I can get a comprehensive list? ...

How do I get a content-type of a file in Python? (with url..)

Suppose I haev a video file: http://mydomain.com/thevideofile.mp4 How do I get the header and the content-type of this file? With Python. But , I don't want to download the entire file. i want it to return: video/mp4 Edit: this is what I did. What do you think? f = urllib2.urlopen(url) params['mime'] = f.headers['content-type'...

Drupal: content types URL?

Hi, I'm new to Drupal and I have a quick question: I've created a content type "news_section" for our site's news, but I have no idea how to access that. It says that I can access it by going to sitename.com/news_section, but that doesn't seem to work. Any idea how to do that? Appreciate your help ...

How to get Content-type using html simple dom?

I tried find('meta[http-equiv="Content-type"]') but it failed to retrieve that information. ...

Understanding large mysql data relations

I am trying to teach myself how to use SQL, namely mysql. What I am trying to understand is how to deal with many different types of data with in the same table. Say I am building a web application, and I have many different content types (blog item, comment item, files, pages, forms) that I need to store different data fields for each...

How can I find out a files "mime-type(Content-Type?)"?

Is there a way to find out the MIME-TYPE (or is it called "Content-Type"...) of a file in a linux bash script? The reason I need it is because imageshack appears to need it to upload a file as for some reason it detects the .png file as an "application/octet-stream"… I'v checked the file, and it really is a .png $ cat /1.png ?PNG (wi...

Why does IIS7 ignore my content-type header when I use ASP.NET to stream files?

I have a simple web site with two pages. One displays a list of files, and the other streams a file when it's clicked in the list. All was fine in production for 6 months, but now I have to move the site to Windows 2008/IIS7. I have it mostly working, but the files don't open properly (in Firefox) because my content-type header is bei...