mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #12802 from overleaf/jdt-parse-all-blg
fetch all blg files to report errors GitOrigin-RevId: eea9b0809e6b2efcf5df20961e94197c583463ef
This commit is contained in:
parent
15f4e2e5cc
commit
1f71e339fb
3 changed files with 33 additions and 2 deletions
|
@ -33,10 +33,18 @@ server {
|
|||
location ~ ^/project/([0-9a-f]+)/user/([0-9a-f]+)/build/([0-9a-f-]+)/output/output\.([a-z]+)$ {
|
||||
alias /var/lib/sharelatex/data/output/$1-$2/generated-files/$3/output.$4;
|
||||
}
|
||||
# handle .blg files for specific users
|
||||
location ~ ^/project/([0-9a-f]+)/user/([0-9a-f]+)/build/([0-9a-f-]+)/output/(.+)\.blg$ {
|
||||
alias /var/lib/sharelatex/data/output/$1-$2/generated-files/$3/$4.blg;
|
||||
}
|
||||
# handle output files for anonymous users
|
||||
location ~ ^/project/([0-9a-f]+)/build/([0-9a-f-]+)/output/output\.([a-z]+)$ {
|
||||
alias /var/lib/sharelatex/data/output/$1/generated-files/$2/output.$3;
|
||||
}
|
||||
# handle .blg files for anonymous users
|
||||
location ~ ^/project/([0-9a-f]+)/build/([0-9a-f-]+)/output/(.+)\.blg$ {
|
||||
alias /var/lib/sharelatex/data/output/$1/generated-files/$2/$3.blg;
|
||||
}
|
||||
|
||||
# PDF range for specific users
|
||||
location ~ ^/project/([0-9a-f]+)/user/([0-9a-f]+)/content/([0-9a-f-]+/[0-9a-f]+)$ {
|
||||
|
|
|
@ -56,6 +56,15 @@ server {
|
|||
}
|
||||
alias /output/$1-$2/generated-files/$3/output.$4;
|
||||
}
|
||||
# handle .blg files for specific users
|
||||
location ~ ^/project/([0-9a-f]+)/user/([0-9a-f]+)/build/([0-9a-f-]+)/output/(.+)\.blg$ {
|
||||
if ($request_method = 'OPTIONS') {
|
||||
# handle OPTIONS method for CORS requests
|
||||
add_header 'Allow' 'GET,HEAD';
|
||||
return 204;
|
||||
}
|
||||
alias /output/$1-$2/generated-files/$3/$4.blg;
|
||||
}
|
||||
# handle output files for anonymous users
|
||||
location ~ ^/project/([0-9a-f]+)/build/([0-9a-f-]+)/output/output\.([a-z]+)$ {
|
||||
if ($request_method = 'OPTIONS') {
|
||||
|
@ -66,6 +75,15 @@ server {
|
|||
}
|
||||
alias /output/$1/generated-files/$2/output.$3;
|
||||
}
|
||||
# handle .blg files for anonymous users
|
||||
location ~ ^/project/([0-9a-f]+)/build/([0-9a-f-]+)/output/(.+)\.blg$ {
|
||||
if ($request_method = 'OPTIONS') {
|
||||
# handle OPTIONS method for CORS requests
|
||||
add_header 'Allow' 'GET,HEAD';
|
||||
return 204;
|
||||
}
|
||||
alias /output/$1/generated-files/$2/$3.blg;
|
||||
}
|
||||
|
||||
# PDF range for specific users
|
||||
location ~ ^/project/([0-9a-f]+)/user/([0-9a-f]+)/content/([0-9a-f-]+/[0-9a-f]+)$ {
|
||||
|
|
|
@ -99,9 +99,14 @@ export const handleLogFiles = async (outputFiles, data, signal) => {
|
|||
}
|
||||
}
|
||||
|
||||
const blgFile = outputFiles.get('output.blg')
|
||||
const blgFiles = []
|
||||
|
||||
if (blgFile) {
|
||||
for (const [filename, file] of outputFiles) {
|
||||
if (filename.endsWith('.blg')) {
|
||||
blgFiles.push(file)
|
||||
}
|
||||
}
|
||||
for (const blgFile of blgFiles) {
|
||||
try {
|
||||
const response = await fetchFromCompileDomain(
|
||||
buildURL(blgFile, data.pdfDownloadDomain, data.enableHybridPdfDownload),
|
||||
|
|
Loading…
Reference in a new issue