fixing fe bug

This commit is contained in:
counter 2023-01-18 21:46:27 -08:00
parent ebde216768
commit 747cc1f8c0

7
app.js
View file

@ -220,7 +220,12 @@ async function get_app_server() {
const gzip = zlib.createGzip();
const gzipTempFileName = multer_temp_image_path + ".gz";
const tempFileWriteStream = fs.createWriteStream(gzipTempFileName);
await input_read_stream.pipe(gzip).pipe(tempFileWriteStream);
input_read_stream.pipe(gzip).pipe(tempFileWriteStream);
// Wait for the file to be finished writing
await new Promise((resolve, reject) => {
tempFileWriteStream.on('finish', resolve);
tempFileWriteStream.on('error', reject);
});
//uploading the gzipped file to GCS
await bucket.upload(gzipTempFileName, {
gzip: true,