plotlink-ows 1.0.26 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/routes/publish.ts +4 -3
- package/package.json +1 -1
package/app/routes/publish.ts
CHANGED
|
@@ -217,9 +217,10 @@ publish.post("/upload-cover", async (c) => {
|
|
|
217
217
|
return c.json({ error: "Image exceeds 500KB limit" }, 400);
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
// Validate file type
|
|
221
|
-
|
|
222
|
-
|
|
220
|
+
// Validate file type — only WebP and JPEG accepted by the plotlink server
|
|
221
|
+
const allowedTypes = ["image/webp", "image/jpeg"];
|
|
222
|
+
if (!allowedTypes.includes(file.type)) {
|
|
223
|
+
return c.json({ error: "Only WebP and JPEG images are accepted" }, 400);
|
|
223
224
|
}
|
|
224
225
|
|
|
225
226
|
const cid = await uploadCoverImage(wallet.name, address as `0x${string}`, file);
|