🔧 Refactoring unrar for single and multiple file extraction

This commit is contained in:
2021-04-19 12:38:55 -07:00
parent e612eea7fd
commit 33741417c1
2 changed files with 82 additions and 32 deletions

View File

@@ -10,12 +10,18 @@ import {
import { Request, Response } from "express";
router.route("/getComicCovers").get(async (req: Request, res: Response) => {
// const foo = await unrar("./comics/covers/");
const foo = await extractArchive({
name: "Dante's Inferno 02 (2010) (noads) (Legion-CPS).cbr",
extension: ".cbr",
containedIn: "comics/Dante's Inferno",
isFile: true,
isLink: false,
});
// const foo = await extractMetadataFromImage(
// "./comics/covers/Ghosts and Ruins-001.jpg",
// );
// const foo = await unzipOne();
const foo = await unzip("asd");
// const foo = await unzip("asd");
res.json({
jagan: "trupti",
foo,