uploads: Revert "Url encoded name of the file should be an ascii."

This reverts commit fd9dd51d16 (#1815).

The issue described does not exist in Python 3, where urllib.parse now
_only_ accepts (Unicode) str and does the right thing with it.  The
workaround was not being triggered and would have failed if it were.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2019-04-22 22:28:39 -07:00
committed by Tim Abbott
parent fd2f45ce5a
commit 61982d9d47
3 changed files with 0 additions and 67 deletions

View File

@@ -284,8 +284,6 @@ def check_upload_within_quota(realm: Realm, uploaded_file_size: int) -> None:
def get_file_info(request: HttpRequest, user_file: File) -> Tuple[str, int, Optional[str]]:
uploaded_file_name = user_file.name
assert isinstance(uploaded_file_name, str)
content_type = request.GET.get('mimetype')
if content_type is None:
guessed_type = guess_type(uploaded_file_name)[0]