Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e4cf682217 | |||
| e4fc8948fa | |||
| 9cfdb714c3 | |||
| ca093008b7 | |||
| 3dc99eff9d | |||
| 530e83ba34 | |||
| 4ae75634ca | |||
| 372ed248f1 |
@@ -74,12 +74,11 @@ We've forked the old version from the current repository into [this repo](https:
|
||||
|
||||
Join and follow us in the following platforms to stay up to date about the most recent features and for support:
|
||||
|
||||
<a href="https://discord.com/invite/CtuYV47nuJ"><img src="https://img.shields.io/discord/1117993124669702164?style=flat-square&logo=discord&logoColor=white&label=DISCORD&color=%2350c728
|
||||
" alt="Discord"></a>
|
||||
<a href="https://discord.com/invite/CtuYV47nuJ"><img src="https://img.shields.io/discord/1117993124669702164?logo=discord&style=flat" alt="Discord"></a>
|
||||
|
||||
<a href="https://fosstodon.org/@linkwarden"><img src="https://img.shields.io/mastodon/follow/110748840237143200?domain=https%3A%2F%2Ffosstodon.org&style=flat-square&logo=mastodon&logoColor=white&label=MASTODON&color=%2350c728" alt="Mastodon"></a>
|
||||
<a href="https://twitter.com/LinkwardenHQ"><img src="https://img.shields.io/twitter/follow/linkwarden" alt="Twitter"></a>
|
||||
|
||||
<a href="https://twitter.com/LinkwardenHQ"><img src="https://img.shields.io/twitter/follow/linkwarden?label=TWITTER&style=flat-square&logo=x&logoColor=white&color=%2350c728" alt="Twitter"></a>
|
||||
<a href="https://fosstodon.org/@linkwarden"><img src="https://img.shields.io/mastodon/follow/110748840237143200?domain=https%3A%2F%2Ffosstodon.org" alt="Mastodon"></a>
|
||||
|
||||
## Suggestions
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ export default async function archiveHandler(link: LinksAndCollectionAndOwner) {
|
||||
if (buffer) {
|
||||
// Load the image using Jimp
|
||||
Jimp.read(buffer, async (err, image) => {
|
||||
if (image) {
|
||||
if (image && !err) {
|
||||
image?.resize(1280, Jimp.AUTO).quality(20);
|
||||
const processedBuffer = await image?.getBufferAsync(
|
||||
Jimp.MIME_JPEG
|
||||
@@ -171,7 +171,7 @@ export default async function archiveHandler(link: LinksAndCollectionAndOwner) {
|
||||
await page.goBack();
|
||||
} else if (!link.preview?.startsWith("archive")) {
|
||||
console.log("No og:image found");
|
||||
page
|
||||
await page
|
||||
.screenshot({ type: "jpeg", quality: 20 })
|
||||
.then((screenshot) => {
|
||||
return createFile({
|
||||
|
||||
@@ -88,7 +88,7 @@ async function migrateToV2() {
|
||||
if (res) {
|
||||
await prisma.link.update({
|
||||
where: { id: link.id },
|
||||
data: { pdfPath: path },
|
||||
data: { pdf: path },
|
||||
});
|
||||
console.log(`${link.id}`);
|
||||
} else {
|
||||
@@ -105,7 +105,7 @@ async function migrateToV2() {
|
||||
if (res) {
|
||||
await prisma.link.update({
|
||||
where: { id: link.id },
|
||||
data: { screenshotPath: path },
|
||||
data: { image: path },
|
||||
});
|
||||
console.log(`${link.id}`);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user