Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm trying to upload an XML file (RSS feed) as part of a product in the WP-Ecommerce plug-in.

The idea being that a customer buying the product would be given this XML file to download which ideally launch iTunes to download the balance as part of a podcast.

I can't seem to upload the .XML feed file. I can upload other file types without a problem, but that one seems to be blocked. Where would I go to allow .XML files to be uploaded? Is it a WP-ECommerce thing, a WordPress thing, or perhaps something on the hosted server itself?

share|improve this question
add comment

1 Answer 1

WordPress does not allow uploads of .xml files but you can add it by adding a mime type for it. This worked for me:

function addUploadXML($mimes) {
    $mimes = array_merge($mimes, array('xml' => 'text/xml'));.
    return $mimes;
}
add_filter('upload_mimes', 'addUploadXML');

Also, when I researched the mime type, I came up with a number of different suggestions for what to use as a mime type for xml. I just used 'text/xml' but I also saw 'application/rss+xml' and 'application/xml' among others.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.