diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-07-06 18:57:58 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-07-06 18:57:58 +0000 |
commit | e0c0ce28ea786a23d15eee95d56560079b0c6dfe (patch) | |
tree | 29788364ad9108712307d3a051ee130a1a8c495a /lib/api | |
parent | f6e822cdbdf2d38f61926d5af6566d7f41e97361 (diff) | |
parent | 805645510a26d11bceb75868996a76eba10ef470 (diff) | |
download | gitlab-ce-e0c0ce28ea786a23d15eee95d56560079b0c6dfe.tar.gz |
Merge branch '46246-gitlab-project-export-should-use-object-storage' into 'master'
Resolve "GitLab Project export should use object storage"
Closes #46246
See merge request gitlab-org/gitlab-ce!20105
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/project_export.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/api/project_export.rb b/lib/api/project_export.rb index 5ef4e9d530c..15c57a2fc02 100644 --- a/lib/api/project_export.rb +++ b/lib/api/project_export.rb @@ -23,9 +23,13 @@ module API get ':id/export/download' do path = user_project.export_project_path - render_api_error!('404 Not found or has expired', 404) unless path - - present_disk_file!(path, File.basename(path), 'application/gzip') + if path + present_disk_file!(path, File.basename(path), 'application/gzip') + elsif user_project.export_project_object_exists? + present_carrierwave_file!(user_project.import_export_upload.export_file) + else + render_api_error!('404 Not found or has expired', 404) + end end desc 'Start export' do |