Make the content repo work with in daemon mode. Return the full url on upload. Update the webclient to use new content repo api.

This commit is contained in:
Erik Johnston 2014-08-22 10:25:27 +01:00
parent 53f4fbd99a
commit acf5127604
3 changed files with 24 additions and 9 deletions

View file

@ -56,7 +56,7 @@ class SynapseHomeServer(HomeServer):
return File("webclient") # TODO configurable?
def build_resource_for_content_repo(self):
return ContentRepoResource("uploads", self.auth)
return ContentRepoResource(self, self.upload_dir, self.auth)
def build_db_pool(self):
""" Set up all the dbs. Since all the *.sql have IF NOT EXISTS, so we
@ -257,7 +257,8 @@ def setup():
hs = SynapseHomeServer(
args.host,
db_name=db_name
upload_dir=os.path.abspath("uploads"),
db_name=db_name,
)
# This object doesn't need to be saved because it's set as the handler for