mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
15 lines
437 B
CoffeeScript
15 lines
437 B
CoffeeScript
settings = require("settings-sharelatex")
|
|
logger = require("logger-sharelatex")
|
|
|
|
# assume s3 if none specified
|
|
settings.filestoreBackend ||= "s3"
|
|
|
|
|
|
logger.log backend:settings.filestoreBackend, "Loading backend"
|
|
module.exports = switch settings.filestoreBackend
|
|
when "s3"
|
|
require("./S3PersistorManager")
|
|
when "fs"
|
|
require("./FSPersistorManager")
|
|
else
|
|
throw new Error( "Unknown filestore backend: #{settings.filestoreBackend}" )
|