mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
change download links so they do not rely on build id
prefer the top level files, because the build directories are more ephemeral. In a shared project they can expire if there are multiple compiles.
This commit is contained in:
parent
f045eb65d3
commit
02e3f7a02b
1 changed files with 10 additions and 6 deletions
|
@ -117,10 +117,12 @@ define [
|
||||||
qs.clsiserverid = response.clsiServerId
|
qs.clsiserverid = response.clsiServerId
|
||||||
ide.clsiServerId = response.clsiServerId
|
ide.clsiServerId = response.clsiServerId
|
||||||
# convert the qs hash into a query string and append it
|
# convert the qs hash into a query string and append it
|
||||||
qs_args = ("#{k}=#{v}" for k, v of qs)
|
$scope.pdf.qs = createQueryString qs
|
||||||
$scope.pdf.qs = if qs_args.length then "?" + qs_args.join("&") else ""
|
|
||||||
$scope.pdf.url += $scope.pdf.qs
|
$scope.pdf.url += $scope.pdf.qs
|
||||||
$scope.pdf.downloadUrl = "/Project/#{$scope.project_id}/output/output.pdf" + $scope.pdf.qs
|
# special case for the download url
|
||||||
|
if perUserCompile
|
||||||
|
qs.isolated = true
|
||||||
|
$scope.pdf.downloadUrl = "/project/#{$scope.project_id}/output/output.pdf" + createQueryString(qs)
|
||||||
|
|
||||||
fetchLogs(fileByPath['output.log'], fileByPath['output.blg'])
|
fetchLogs(fileByPath['output.log'], fileByPath['output.blg'])
|
||||||
|
|
||||||
|
@ -136,10 +138,12 @@ define [
|
||||||
file.name = "#{file.path.replace(/^output\./, "")} file"
|
file.name = "#{file.path.replace(/^output\./, "")} file"
|
||||||
else
|
else
|
||||||
file.name = file.path
|
file.name = file.path
|
||||||
if not file.url?
|
qs = {}
|
||||||
file.url = "/project/#{project_id}/output/#{file.path}"
|
if perUserCompile
|
||||||
|
qs.isolated = true
|
||||||
if response.clsiServerId?
|
if response.clsiServerId?
|
||||||
file.url = file.url + "?clsiserverid=#{response.clsiServerId}"
|
qs.clsiserverid = response.clsiServerId
|
||||||
|
file.url = "/project/#{project_id}/output/#{file.path}" + createQueryString qs
|
||||||
$scope.pdf.outputFiles.push file
|
$scope.pdf.outputFiles.push file
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue