Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions app/routes/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,10 @@ publish.post("/upload-cover", async (c) => {
return c.json({ error: "Image exceeds 500KB limit" }, 400);
}

// Validate file type
if (!file.type.startsWith("image/")) {
return c.json({ error: "File must be an image (WebP or JPEG recommended)" }, 400);
// Validate file type — only WebP and JPEG accepted by the plotlink server
const allowedTypes = ["image/webp", "image/jpeg"];
if (!allowedTypes.includes(file.type)) {
return c.json({ error: "Only WebP and JPEG images are accepted" }, 400);
}

const cid = await uploadCoverImage(wallet.name, address as `0x${string}`, file);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plotlink-ows",
"version": "1.0.26",
"version": "1.0.27",
"bin": {
"plotlink-ows": "./bin/plotlink-ows.js"
},
Expand Down
Loading