summaryrefslogtreecommitdiff
path: root/app/models/blob_viewer/download.rb
blob: adc06587f6981d3a40d3b6d66cc9f7220904ea11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module BlobViewer
  class Download < Base
    include Simple
    # We treat the Download viewer as if it renders the content client-side,
    # so that it doesn't attempt to load the entire blob contents and is
    # rendered synchronously instead of loaded asynchronously.
    include ClientSide

    self.partial_name = 'download'
    self.binary = true

    # We can always render the Download viewer, even if the blob is in LFS or too large.
    def render_error
      nil
    end
  end
end