mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	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:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							fd2f45ce5a
						
					
				
				
					commit
					61982d9d47
				
			@@ -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]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user