Extend the list of allowable file types for blogsExtend the list of possible file types that users could upload to a blog.
About this taskWhen a file is uploaded to a blog, the mime type specified in the content type in the http request header must match a mime type available for the Java™ Virtual Machine (JVM) so that the correct file extension is applied. By default, the JVM supports a default set of mime types that map the most common types of content to the correct file extensions. You can extend the list so that users can upload files of types that are not specified in the default list. After you extend the list specify that the file type is allowable as an upload. Follow these steps to extend the list and make a new file type allowable for uploads:
- Edit file mime.types in the directory...
The file only includes comments:
# Copyright IBM Corp. 2009 All Rights Reserved. # # comments begin with a '#' # the format is <mime type> <space separated file extensions> # for example: (without the # comment mark) # text/plain txt text TXT # this would map file.txt, file.text, and file.TXT to # the mime type "text/plain"
- Add the mime types you want users to be able to upload.
For example, to support the upload of Microsoft Excel files, add the mime type...
application/vnd.ms-excel xls XLS
Blogs would then be able to recognize that file type and assign the XLS file extension.
- Save the file and restart the Blogs server.
- From the Blogs interface, choose the Administration tab.
- On the Configuration page, make sure that Enable File Uploads is enabled.
- Add the new file extension to the Allowed Extensions field.
What to do nextYour users will now be able to upload files of the type you specified.
Parent topicAdminister Blogs
Work with media resources