Implemented file storage handling for Corporate Transfer and Comission Transfer

This commit is contained in:
Joao Ramos
2023-12-13 23:29:14 +00:00
parent 21b612eaa4
commit 020ecff29c
10 changed files with 473 additions and 12 deletions

View File

@@ -3,7 +3,7 @@ import type {NextApiRequest, NextApiResponse} from "next";
import {withIronSessionApiRoute} from "iron-session/next";
import {sessionOptions} from "@/lib/session";
import {getDownloadURL, getStorage, ref} from "firebase/storage";
import {app} from "@/firebase";
import {app, storage} from "@/firebase";
import axios from "axios";
export default withIronSessionApiRoute(handler, sessionOptions);
@@ -14,7 +14,6 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
return;
}
const storage = getStorage(app);
const {path} = req.body as {path: string};
const pathReference = ref(storage, path);