mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-10-19 06:07:21 +02:00
do not display files bigger than 1mo
This commit is contained in:
1 parent
fec96a326e
commit
1a9fb3d142
1 file changed
+2
@@ -48,6 +48,8 @@ class Anonymous_Github:
|
||||
for term in terms:
|
||||
content = content.replace(term, "XXX")
|
||||
return content
|
||||
if file.size > 1000000:
|
||||
return Markup("The file %s is too big please download it: <a href='%s'>Download %s</a>" % (file.name, file.url, file.name))
|
||||
if ".md" in file.name:
|
||||
return Markup("<div class='markdown-body'>%s</div>" % removeTerms(self.github.render_markdown(file.decoded_content), terms))
|
||||
if ".jpg" in file.name or ".png" in file.name or ".png" in file.name or ".gif" in file.name:
|
||||
|
||||
Reference in new issue
Block a user