Commit graph

11 commits

Author SHA1 Message Date
Kushal Pandya
ff24f0e455 HAMLLint: Fix RubyComments offences 2017-01-24 10:09:28 -08:00
Kushal Pandya
fb3e365412 HAMLLint: Fix SpaceInsideHashAttributes offences 2016-12-31 11:58:36 +05:30
Kushal Pandya
71dc50f048 HAMLLint: fix AltText offences 2016-12-31 11:43:08 +05:30
Yorick Peterse
8171544b3d
Limit the size of SVGs when viewing them as blobs
This ensures that SVGs greater than 2 megabytes are not scrubbed and
rendered. This in turn prevents requests from timing out due to
reading/scrubbing large SVGs potentially taking a lot of time (and
memory). The use of 2 megabytes is completely arbitrary.

Fixes gitlab-org/gitlab-ce#1435
2016-08-15 13:42:52 +02:00
Jacob Vosmaer
fc90d9e589 Tell clients/proxies to cache raw blob requests 2016-03-03 17:59:47 +01:00
Robert Speicher
8c454b3624 Add a Blob model that wraps Gitlab::Git::Blob
This allows us to take advantage of Rails' `to_partial_path` to render
the correct partial based on the Blob type, rather than cluttering the
view with conditionals.

It also allows (and will allow in the future) better encapsulation for
Blob-related logic which makes sense for our Rails app but might not
make as much sense for the core `gitlab_git` library, such as detecting
if the blob is an SVG.
2016-02-18 22:45:30 -05:00
Jacob Vosmaer
a87fe2a472 Fixes requested by Rémy 2016-02-17 11:08:47 +01:00
Jacob Vosmaer
15126fc70f Fix SVG blob rendering 2016-02-16 17:01:25 +01:00
Jacob Vosmaer
53ddb8f2cc Use a /raw/ request to show an image 2016-01-20 13:44:39 +01:00
Dmitriy Zaporozhets
3805797cae scss: rename file_content to file-content etc 2013-07-13 09:52:47 +03:00
Dmitriy Zaporozhets
2ed7cbfba4 Move projects controllers/views in Projects module 2013-06-23 19:47:22 +03:00
Renamed from app/views/blob/_image.html.haml (Browse further)