 			else
 				logger.log key:key, bucket:bucket, format:format, style:style, "sending bucket file to response"
 				fileStream.pipe res
-

PersistorManager = require("./PersistorManager")
settings = require("settings-sharelatex")
logger = require("logger-sharelatex")
FileHandler = require("./FileHandler")
metrics = require("metrics-sharelatex")
parseRange = require('range-parser')
Errors = require('./Errors')

oneDayInSeconds = 60 * 60 * 24
maxSizeInBytes = 1024 * 1024 * 1024 # 1GB

module.exports = BucketController =


			bucket: bucket,
			credentials: credentials
		}
		metrics.inc "#{bucket}.getFile"
		logger.log key:key, bucket:bucket, "receiving request to get file from bucket"
		FileHandler.getFile bucket, key, options, (err, fileStream)->
			if err?
