no file subtype can be an issue, added a check on it in the keybuilder

This commit is contained in:
Henry Oswald 2015-04-13 12:01:49 +01:00
parent 158b640b59
commit 7c2e4b00ed

View file

@ -25,7 +25,9 @@ module.exports =
templateFileKey: (req, res, next)-> templateFileKey: (req, res, next)->
{template_id, format, version, sub_type} = req.params {template_id, format, version, sub_type} = req.params
req.key = "#{template_id}/v/#{version}/#{format}/#{sub_type}" req.key = "#{template_id}/v/#{version}/#{format}"
if sub_type?
req.key = "#{req.key}/#{sub_type}"
req.bucket = settings.filestore.stores.template_files req.bucket = settings.filestore.stores.template_files
req.version = version req.version = version
opts = req.query opts = req.query