Added Custom mime.types file for swift.

This commit is contained in:
Conrad Weidenkeller 2010-11-23 18:59:31 -06:00
parent 111ebb5a09
commit df7f1d3147
2 changed files with 6 additions and 0 deletions

5
etc/mime.types-sample Normal file
View File

@ -0,0 +1,5 @@
#########################################################
# A nice place to put custom Mime-Types for Swift #
# Please enter Mime-Types in standard mime.types format #
# Mime-Type Extension ex. image/jpeg jpg #
#########################################################

View File

@ -1268,6 +1268,7 @@ class BaseApplication(object):
self.account_ring = account_ring or \ self.account_ring = account_ring or \
Ring(os.path.join(swift_dir, 'account.ring.gz')) Ring(os.path.join(swift_dir, 'account.ring.gz'))
self.memcache = memcache self.memcache = memcache
mimetypes.init(mimetypes.knownfiles + [os.path.join(self.swift_dir, 'mime.types')])
def get_controller(self, path): def get_controller(self, path):
""" """