minor fix
This commit is contained in:
parent
2a83ced9d8
commit
ced51e4801
|
@ -11,7 +11,8 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres
|
- DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres
|
||||||
restart: always
|
restart: always
|
||||||
image: ghcr.io/linkwarden/linkwarden:latest
|
# build: . # uncomment this line to build from source
|
||||||
|
image: ghcr.io/linkwarden/linkwarden:latest # comment this line to build from source
|
||||||
ports:
|
ports:
|
||||||
- 3000:3000
|
- 3000:3000
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
@ -50,11 +50,11 @@ export default async function archiveHandler(link: LinksAndCollectionAndOwner) {
|
||||||
let imageExtension = "png";
|
let imageExtension = "png";
|
||||||
|
|
||||||
if (!link.url) linkType = link.type;
|
if (!link.url) linkType = link.type;
|
||||||
else if (contentType === "application/pdf") linkType = "pdf";
|
else if (contentType?.includes("application/pdf")) linkType = "pdf";
|
||||||
else if (contentType?.startsWith("image")) {
|
else if (contentType?.startsWith("image")) {
|
||||||
linkType = "image";
|
linkType = "image";
|
||||||
if (contentType === "image/jpeg") imageExtension = "jpeg";
|
if (contentType.includes("image/jpeg")) imageExtension = "jpeg";
|
||||||
else if (contentType === "image/png") imageExtension = "png";
|
else if (contentType.includes("image/png")) imageExtension = "png";
|
||||||
}
|
}
|
||||||
|
|
||||||
const user = link.collection?.owner;
|
const user = link.collection?.owner;
|
||||||
|
|
Ŝarĝante…
Reference in New Issue