Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Policy upload to Filebase/IPFS #639

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
fix(web): convert to expected type
  • Loading branch information
alcercu committed Mar 17, 2023
commit 3f25c4a89b6c6f73392ad29244dd831acdfc0865
3 changes: 2 additions & 1 deletion web/netlify/functions/uploadToIPFS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const handler: Handler = async function (event) {
const file = parseMultiPartData(event.body, event.headers);
const s3Key = await uploadToS3(file["name"], file["parts"]);
const cid = await getCID(s3Key);
console.log(cid);
await rabbitMQUpload(cid);

return {
Expand Down Expand Up @@ -67,7 +68,7 @@ const parseMultiPartData = (
});
});

bb.write(Buffer.from(body, "base64").toString("utf8"));
bb.write(Buffer.from(body, "base64"));

return file;
};
Expand Down