mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	upload: Show text/plain uploads inline.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							f4cbdd8c9c
						
					
				
				
					commit
					84d5ef1285
				
			@@ -22,6 +22,7 @@ INLINE_MIME_TYPES = [
 | 
			
		||||
    "image/jpeg",
 | 
			
		||||
    "image/png",
 | 
			
		||||
    "image/webp",
 | 
			
		||||
    "text/plain",
 | 
			
		||||
    "video/mp4",
 | 
			
		||||
    "video/webm",
 | 
			
		||||
    # To avoid cross-site scripting attacks, DO NOT add types such
 | 
			
		||||
 
 | 
			
		||||
@@ -1005,14 +1005,11 @@ class FileUploadTest(UploadSerializeMixin, ZulipTestCase):
 | 
			
		||||
                self.assertIn(content_disposition, response["Content-disposition"])
 | 
			
		||||
            self.assertEqual(set(response["Cache-Control"].split(", ")), {"private", "immutable"})
 | 
			
		||||
 | 
			
		||||
        check_xsend_links(
 | 
			
		||||
            "zulip.txt", "zulip.txt", 'filename="zulip.txt"', returned_attachment=True
 | 
			
		||||
        )
 | 
			
		||||
        check_xsend_links("zulip.txt", "zulip.txt", 'filename="zulip.txt"')
 | 
			
		||||
        check_xsend_links(
 | 
			
		||||
            "áéБД.txt",
 | 
			
		||||
            "%C3%A1%C3%A9%D0%91%D0%94.txt",
 | 
			
		||||
            "filename*=utf-8''%C3%A1%C3%A9%D0%91%D0%94.txt",
 | 
			
		||||
            returned_attachment=True,
 | 
			
		||||
        )
 | 
			
		||||
        check_xsend_links(
 | 
			
		||||
            "zulip.html",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user