diff options
author | Jason Hollingsworth <jhworth.developer@gmail.com> | 2013-12-20 23:12:44 +0400 |
---|---|---|
committer | Jason Hollingsworth <jhworth.developer@gmail.com> | 2014-01-02 20:18:56 +0400 |
commit | 7cc25205410efc6b20b11d94ab2cbc1a322ff816 (patch) | |
tree | 8d8ce2cd304bd46426bb4c186ca690e6650e5d57 /app/controllers/projects/repositories_controller.rb | |
parent | b512fbc0ecba0a8de9c9efe5c7d82a97f0ea744c (diff) |
Add support for various archive formats.
Used mime-types gem instead of hardcoding content types.
Allow multiple extensions in archive route (.tar.gz, .tar.bz2).
Change content disposition from infile(?) to attachment for api.
Fixed api would return “archive” instead of {project}-{hash}.{ext}
Diffstat (limited to 'app/controllers/projects/repositories_controller.rb')
-rw-r--r-- | app/controllers/projects/repositories_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/repositories_controller.rb b/app/controllers/projects/repositories_controller.rb index 20e2a9311ee..f686db70bd4 100644 --- a/app/controllers/projects/repositories_controller.rb +++ b/app/controllers/projects/repositories_controller.rb @@ -16,7 +16,7 @@ class Projects::RepositoriesController < Projects::ApplicationController storage_path = Rails.root.join("tmp", "repositories") - file_path = @repository.archive_repo(params[:ref], storage_path) + file_path = @repository.archive_repo(params[:ref], storage_path, params[:format].downcase) if file_path # Send file to user |