Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1901)

Unified Diff: upload.py

Issue 10117044: Treat svg as text, not image.
Patch Set: Created 12 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: upload.py
===================================================================
--- a/upload.py
+++ b/upload.py
@@ -1163,7 +1163,7 @@
mimetype = mimetypes.guess_type(filename)[0]
if not mimetype:
return False
- return mimetype.startswith("image/")
+ return mimetype.startswith("image/") and not mimetype.startswith("image/svg")
def IsBinaryData(self, data):
"""Returns true if data contains a null byte."""
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b