forked from MapComplete/MapComplete
Offline: add safety check
This commit is contained in:
parent
457d7a711d
commit
ea54d27f3a
1 changed files with 4 additions and 0 deletions
|
@ -85,6 +85,10 @@ class ServerPmTileExtracts extends Script {
|
|||
}
|
||||
const stats = statSync(targetFile)
|
||||
|
||||
if(stats.size >= 250 * 1000000 /* Megabyte*/){
|
||||
throw "File to big to transfer, over 100 MB"
|
||||
}
|
||||
|
||||
res.writeHead(200, { "Content-Type": "application/octet-stream" ,
|
||||
"Content-Length": stats.size
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue