Offline: add safety check

This commit is contained in:
Pieter Vander Vennet 2025-10-15 18:11:22 +02:00
parent 457d7a711d
commit ea54d27f3a

View file

@ -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
})