IO-2008 Include mime type for listed media.
This commit is contained in:
@@ -71,8 +71,9 @@ async function GeneratePdfThumbnail(file: string, thumbPath: string) {
|
||||
const fileOnDisk: Buffer = await fs.readFile(file);
|
||||
return new Promise<string>((resolve, reject) => {
|
||||
const result = gm(fileOnDisk)
|
||||
.selectFrame(0)
|
||||
.setFormat("png")
|
||||
.resize(200) // Resize to fixed 200px width, maintaining aspect ratio
|
||||
.resize(200, 200, "!") // Resize to fixed 200px width, maintaining aspect ratio
|
||||
.quality(75)
|
||||
.write(thumbPath, (error) => {
|
||||
if (error) reject(error.message);
|
||||
|
||||
Reference in New Issue
Block a user