1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-26 02:00:05 +00:00

Merge pull request #219 from sasjs/issue211

fix(deploy): extract first json from zip file
This commit is contained in:
Allan Bowe
2022-07-02 10:57:16 +01:00
committed by GitHub

View File

@@ -28,7 +28,8 @@ export const extractJSONFromZip = async (zipFile: Express.Multer.File) => {
for await (const entry of zip) {
const fileName = entry.path as string
if (fileName.toUpperCase().endsWith('.JSON') && fileName === fileInZip) {
// grab the first json found in .zip
if (fileName.toUpperCase().endsWith('.JSON')) {
fileContent = await entry.buffer()
break
} else {