forked from MirrorHub/synapse
Merge pull request #2857 from matrix-org/erikj/upload_store
Tell storage providers about new file so they can upload
This commit is contained in:
commit
1026690cd2
1 changed files with 6 additions and 0 deletions
|
@ -70,6 +70,12 @@ class MediaStorage(object):
|
||||||
_write_file_synchronously, source, fname,
|
_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)
|
defer.returnValue(fname)
|
||||||
|
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
|
|
Loading…
Reference in a new issue