Use @repository
This commit is contained in:
parent
b1f22aa35a
commit
b67f8eee0d
|
@ -2,11 +2,10 @@ class Projects::AvatarsController < Projects::ApplicationController
|
|||
before_action :project
|
||||
|
||||
def show
|
||||
repository = @project.repository
|
||||
@blob = repository.blob_at_branch('master', @project.avatar_in_git)
|
||||
@blob = @repository.blob_at_branch('master', @project.avatar_in_git)
|
||||
if @blob
|
||||
headers['X-Content-Type-Options'] = 'nosniff'
|
||||
headers.store(*Gitlab::Workhorse.send_git_blob(repository, @blob))
|
||||
headers.store(*Gitlab::Workhorse.send_git_blob(@repository, @blob))
|
||||
headers['Content-Disposition'] = 'inline'
|
||||
headers['Content-Type'] = @blob.content_type
|
||||
head :ok # 'render nothing: true' messes up the Content-Type
|
||||
|
|
Loading…
Reference in New Issue