gitlab-org--gitlab-foss/app/models/blob_viewer/download.rb

18 lines
495 B
Ruby
Raw Normal View History

2017-04-13 13:04:29 -04:00
module BlobViewer
class Download < Base
include Simple
2017-04-21 14:22:04 -04:00
# 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.
2017-04-20 12:48:19 -04:00
include ClientSide
2017-04-13 13:04:29 -04:00
self.partial_name = 'download'
self.binary = true
2017-04-13 13:04:29 -04:00
2017-04-26 16:29:12 -04:00
# We can always render the Download viewer, even if the blob is in LFS or too large.
2017-04-21 14:59:34 -04:00
def render_error
2017-04-13 13:04:29 -04:00
nil
end
end
end