Merge pull request #2857 from matrix-org/erikj/upload_store

Tell storage providers about new file so they can upload
pull/4/merge
Erik Johnston 7 years ago committed by GitHub
commit 1026690cd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      synapse/rest/media/v1/media_storage.py

@ -70,6 +70,12 @@ class MediaStorage(object):
_write_file_synchronously, source, fname,
))
# Tell the storage providers about the new file. They'll decide
# if they should upload it and whether to do so synchronously
# or not.
for provider in self.storage_providers:
yield provider.store_file(path, file_info)
defer.returnValue(fname)
@contextlib.contextmanager

Loading…
Cancel
Save