diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-04-20 19:48:19 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-04-27 20:23:26 +0300 |
commit | 36e7b322a765fa29a764f2ef1c2f0d28b27a569e (patch) | |
tree | fe16fcff49fed19c0275ca0ef04a1ffa696302db /app/models | |
parent | 7cc4546bc97316e40da367c3894b5e4cf7a155ea (diff) |
Download blob viewer is client-side
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/blob_viewer/base.rb | 2 | ||||
-rw-r--r-- | app/models/blob_viewer/download.rb | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/models/blob_viewer/base.rb b/app/models/blob_viewer/base.rb index 37acacc0019..ce4f129232d 100644 --- a/app/models/blob_viewer/base.rb +++ b/app/models/blob_viewer/base.rb @@ -75,7 +75,7 @@ module BlobViewer end def server_side_but_stored_in_lfs? - !client_side? && blob.valid_lfs_pointer? + server_side? && blob.valid_lfs_pointer? end end end diff --git a/app/models/blob_viewer/download.rb b/app/models/blob_viewer/download.rb index 45cb38a3268..e406cfc05f7 100644 --- a/app/models/blob_viewer/download.rb +++ b/app/models/blob_viewer/download.rb @@ -1,7 +1,9 @@ module BlobViewer class Download < Base include Simple - include ServerSide + # We pretend the Download viewer is rendered client-side so that it doesn't + # attempt to load the entire blob contents. + include ClientSide self.partial_name = 'download' self.text_based = false |