Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Remove unused, undocumented "content repo" resource
Browse files Browse the repository at this point in the history
This looks like it got half-killed back in #888.

Fixes #6567.
  • Loading branch information
richvdh committed Jan 3, 2020
1 parent dc96943 commit 442fa54
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 123 deletions.
1 change: 1 addition & 0 deletions changelog.d/6628.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove unused, undocumented /_matrix/content API.
4 changes: 0 additions & 4 deletions docs/sample_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -692,10 +692,6 @@ media_store_path: "DATADIR/media_store"
# config:
# directory: /mnt/some/other/directory

# Directory where in-progress uploads are stored.
#
uploads_path: "DATADIR/uploads"

# The largest allowed upload size in bytes
#
#max_upload_size: 10M
Expand Down
1 change: 0 additions & 1 deletion synapse/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
FEDERATION_UNSTABLE_PREFIX = FEDERATION_PREFIX + "/unstable"
STATIC_PREFIX = "/_matrix/static"
WEB_CLIENT_PREFIX = "/_matrix/client"
CONTENT_REPO_PREFIX = "/_matrix/content"
SERVER_KEY_V2_PREFIX = "/_matrix/key/v2"
MEDIA_PREFIX = "/_matrix/media/r0"
LEGACY_MEDIA_PREFIX = "/_matrix/media/v1"
Expand Down
8 changes: 1 addition & 7 deletions synapse/app/homeserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,7 @@ def _configure_named_resource(self, name, compress=False):
if self.get_config().enable_media_repo:
media_repo = self.get_media_repository_resource()
resources.update(
{
MEDIA_PREFIX: media_repo,
LEGACY_MEDIA_PREFIX: media_repo,
CONTENT_REPO_PREFIX: ContentRepoResource(
self, self.config.uploads_path
),
}
{MEDIA_PREFIX: media_repo, LEGACY_MEDIA_PREFIX: media_repo}
)
elif name == "media":
raise ConfigError(
Expand Down
3 changes: 0 additions & 3 deletions synapse/app/media_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ def _listen_http(self, listener_config):
{
MEDIA_PREFIX: media_repo,
LEGACY_MEDIA_PREFIX: media_repo,
CONTENT_REPO_PREFIX: ContentRepoResource(
self, self.config.uploads_path
),
"/_synapse/admin": admin_resource,
}
)
Expand Down
5 changes: 0 additions & 5 deletions synapse/config/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ def read_config(self, config, **kwargs):
(provider_class, parsed_config, wrapper_config)
)

self.uploads_path = self.ensure_directory(config.get("uploads_path", "uploads"))
self.dynamic_thumbnails = config.get("dynamic_thumbnails", False)
self.thumbnail_requirements = parse_thumbnail_requirements(
config.get("thumbnail_sizes", DEFAULT_THUMBNAIL_SIZES)
Expand Down Expand Up @@ -231,10 +230,6 @@ def generate_config_section(self, data_dir_path, **kwargs):
# config:
# directory: /mnt/some/other/directory
# Directory where in-progress uploads are stored.
#
uploads_path: "%(uploads_path)s"
# The largest allowed upload size in bytes
#
#max_upload_size: 10M
Expand Down
Empty file removed synapse/rest/media/v0/__init__.py
Empty file.
103 changes: 0 additions & 103 deletions synapse/rest/media/v0/content_repository.py

This file was deleted.

0 comments on commit 442fa54

Please sign in to comment.