feature API call to download repo archive
Created by: karlhungus
defaults to HEAD
Conflicts: spec/requests/api/repositories_spec.rb
Change-Id: Id114aca6c59d75f18e49bf9f33809a04e010bfb6
Created by: coveralls
Coverage decreased (-14.03%) when pulling 3fe5c3f0736b3e039849c210cec2cc2e547e1ebf on karlhungus:feature-api-download-archive into 052a7cc9 on gitlabhq:master.
By Administrator on 2013-09-27T05:29:03 (imported from GitLab project)
Created by: karlhungus
@MrKeiKun did actually you try this? i get something of the form
<namespace>_<filename>-4a6e4cee6e00f918a7fa00fe25980c402d60341a.tar.gz
. What tool/browser/os are you using (they might be appending the extra .tar.gz?By Administrator on 2013-09-27T13:30:06 (imported from GitLab project)
Created by: karlhungus
@MrKeiKun heh, chrome on linux ignores the content disposition and just calls it
archive
... I don't have a good solution for this other then putting in a302
ala github's http://developer.github.com/v3/repos/contents/#get-archive-link. In someways this makes sense. There is another issue with this PR - that thesetmp
dir's don't seem to get cleaned up (i could be wrong about this).By Administrator on 2013-09-27T13:52:17 (imported from GitLab project)
Created by: karlhungus
@MrKeiKun that
header "Content-Disposition:"," infile; filename=\"#{File.basename(file_path)}\""
I added isn't necessarily the best solution (it isn't respected (obviously) by all browsers); it was just an easier solution. I'm actually a little bit ok with sometimes people gettingarchive
, or.tar.gz.tar.gz
, If this isn't a reasonable solution for @randx etc I can change this to use the302
method ala github.By Administrator on 2013-09-27T15:59:59 (imported from GitLab project)