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

Commit

Permalink
size > upload_size as per spec feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot committed May 3, 2018
1 parent 53385e8 commit 3976352
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions synapse/rest/media/v1/limits_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import synapse.http.servlet

#
from twisted.web.server import NOT_DONE_YET
from twisted.web.resource import Resource
from synapse.http.server import respond_with_json
from synapse.http.server import respond_with_json, respond_with_json_bytes


class MediaLimitsResource(Resource):
Expand All @@ -27,8 +25,12 @@ def __init__(self, hs):
Resource.__init__(self)
self.limits_dict = {}
config = hs.get_config()
self.limits_dict["size"] = config.max_upload_size
self.limits_dict["upload_size"] = config.max_upload_size

def render_GET(self, request):
respond_with_json(request, 200, self.limits_dict)
respond_with_json(request, 200, self.limits_dict, send_cors=True)
return NOT_DONE_YET

def render_OPTIONS(self, request):
respond_with_json_bytes(request, 200, {}, send_cors=True)
return NOT_DONE_YET

0 comments on commit 3976352

Please sign in to comment.