1
0
Fork 0

updating append and directory zips

pull/1700/head
Vallie Joseph 2024-03-28 14:44:20 +00:00
parent 13d981a863
commit e71ddb9e5a
1 changed files with 18 additions and 4 deletions

View File

@ -56,13 +56,27 @@ export async function createZipUploadStream(
for (const file of uploadSpecification) {
if (file.sourcePath !== null) {
// Add a normal file to the zip
zip.append(createReadStream(file.sourcePath), {
name: file.destinationPath
})
// zip.append(createReadStream(file.sourcePath), {
// name: file.destinationPath
// })
zip.entry(
createReadStream(file.sourcePath),
{name: file.destinationPath},
function (err, entry) {
core.debug(`Entry is: ${entry}`)
if (err) throw err
}
)
} else {
zip.entry(null, {name: file.destinationPath}, function (err, entry) {
core.debug(`Entry is: ${entry}`)
if (err) throw err
})
// Add a directory to the zip
zip.append('', {name: file.destinationPath})
// zip.append('', {name: file.destinationPath})
}
zip.finish()
}
const bufferSize = getUploadChunkSize()