[plugins]
[[mediagoblin.plugins.geolocation]]
[[mediagoblin.plugins.basic_auth]]
+[[mediagoblin.media_types.image]]
return manager
# Not found? Then raise an error
raise FileTypeNotSupported(
- "MediaManager not in enabled types. Check media_types in config?")
+ "MediaManager not in enabled types. Check media_type plugins are"
+ " enabled in config?")
def get_fail_exception(self):
"""
def setup_plugin():
- config = pluginapi.get_config('mediagoblin.pluginapi.media_types.image')
+ config = pluginapi.get_config('mediagoblin.media_types.image')
class ImageMediaManager(MediaManagerBase):
def get_media_type_and_manager(ext):
if ext in ACCEPTED_EXTENSIONS:
- return ImageMediaManager
+ return MEDIA_TYPE, ImageMediaManager
hooks = {
'setup': setup_plugin,
- 'extensions': get_media_type_and_manager,
+ 'get_media_type_and_manager': get_media_type_and_manager,
'sniff_handler': sniff_handler,
'get_media_manager': get_media_manager,
}
# So we can start to test attachments:
allow_attachments = True
-media_types = mediagoblin.media_types.image, mediagoblin.media_types.pdf
-
[storage:publicstore]
base_dir = %(here)s/user_dev/media/public
base_url = /mgoblin_media/
[[mediagoblin.plugins.httpapiauth]]
[[mediagoblin.plugins.piwigo]]
[[mediagoblin.plugins.basic_auth]]
+[[mediagoblin.media_types.image]]
+[[mediagoblin.media_types.pdf]]