Commit b67f8eee authored by Jacob Vosmaer's avatar Jacob Vosmaer

Use @repository

parent b1f22aa3
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment