Commit graph

22 commits

Author SHA1 Message Date
Francisco Javier López
5a3e6fdff9
Fixing image lfs bug and also displaying text lfs
This commit, introduced in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23812,
fixes a problem creating a displaying image diff notes when the image
is stored in LFS. The main problem was that `Gitlab::Diff::File` was
returning an invalid valid in `text?` for this kind of files.

It also fixes a rendering problem with other LFS files, like text
ones. They LFS pointer shouldn't be shown when LFS is enabled
for the project, but they were.
2018-12-27 16:51:07 +01:00
gfyoung
388cb319d5 Enable frozen string for app/models/**/*.rb
Partially addresses #47424.
2018-08-03 01:44:16 -07:00
Douwe Maan
f711b2df8b Clean up some backend 2017-08-03 14:29:35 +02:00
Douwe Maan
370bc86fb0 Detect if file that appears to be text in the first 1024 bytes is actually binary afer loading all data 2017-06-08 12:49:03 -05:00
Douwe Maan
369d681eec Add Blob#file_type convenience method 2017-06-08 10:07:17 -05:00
Douwe Maan
aed0387f97 Consistent diff and blob size limit names 2017-05-29 17:02:02 -05:00
Douwe Maan
d1bce8ea75 Add auxiliary blob viewer for CHANGELOG 2017-05-17 18:00:13 +00:00
Douwe Maan
b0a163208c Rename BlobViewer max_size to overridable_max_size and absolute_max_size to max_size 2017-05-15 10:03:34 -05:00
Douwe Maan
acffc06213 Specify explicitly whether a blob viewer should be loaded asynchronously 2017-05-13 11:46:10 -05:00
Douwe Maan
4328bc1769 Allow blob viewer to support multiple filetypes 2017-05-13 11:46:10 -05:00
Douwe Maan
08706f6837 Implement auxiliary blob viewers 2017-05-10 20:07:04 -05:00
Douwe Maan
720cc14a75 Refactor Blob support of external storage in preparation of job artifact blobs 2017-05-03 10:20:05 -05:00
Douwe Maan
6287e2825c Fix typo 2017-04-27 12:23:27 -05:00
Douwe Maan
87a3bd26fa Address feedback 2017-04-27 12:23:27 -05:00
Douwe Maan
c6b2a22f63 Explain BlobViewer::Base#render_error 2017-04-27 12:23:27 -05:00
Douwe Maan
964e7d206b Add specs 2017-04-27 12:23:26 -05:00
Douwe Maan
0b3ff9c804 Set BlobViewer::Base.binary instead of .text 2017-04-27 12:23:26 -05:00
Douwe Maan
a2f4650fc7 Add BlobViewer::Base#binary? method 2017-04-27 12:23:26 -05:00
Douwe Maan
0e0c760e48 Refactor overriding max size 2017-04-27 12:23:26 -05:00
Douwe Maan
c69a0779fb Address feedback 2017-04-27 12:23:26 -05:00
Douwe Maan
36e7b322a7 Download blob viewer is client-side 2017-04-27 12:23:26 -05:00
Douwe Maan
13891a03c7 Refactor Blob and add BlobViewer::Base 2017-04-27 12:23:26 -05:00