fix: we need to read json, not form data
This commit is contained in:
parent
64c5642010
commit
8277c3e6df
|
@ -14,8 +14,7 @@ import path from "path";
|
||||||
// Action function for POST requests
|
// Action function for POST requests
|
||||||
export async function action({ request }: ActionFunctionArgs) {
|
export async function action({ request }: ActionFunctionArgs) {
|
||||||
const client = new S5Client("https://s5.web3portal.com");
|
const client = new S5Client("https://s5.web3portal.com");
|
||||||
const formData = await request.formData();
|
const data = await request.json();
|
||||||
const data = Object.fromEntries(formData.entries());
|
|
||||||
const meta = (await client.getMetadata(data.cid as string)) as any;
|
const meta = (await client.getMetadata(data.cid as string)) as any;
|
||||||
const fileMeta = meta.metadata as any;
|
const fileMeta = meta.metadata as any;
|
||||||
const paths = fileMeta.paths as {
|
const paths = fileMeta.paths as {
|
||||||
|
|
Loading…
Reference in New Issue