Solved some more bugs and styling

This commit is contained in:
Tiago Ribeiro
2023-07-25 00:09:25 +01:00
parent 581adbb56e
commit 02260d496c
16 changed files with 36 additions and 24 deletions

View File

@@ -28,7 +28,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
const profilePictureFiletype = updatedUser.profilePicture.split(";")[0].split("/")[1];
const profilePictureRef = ref(storage, `profile_pictures/${req.session.user.id}.${profilePictureFiletype}`);
const pictureBytes = Buffer.from(updatedUser.profilePicture, "base64url");
const pictureBytes = Buffer.from(updatedUser.profilePicture.split(";base64,")[1], "base64url");
const pictureSnapshot = await uploadBytes(profilePictureRef, pictureBytes);
const pictureReference = ref(storage, pictureSnapshot.metadata.fullPath);
@@ -64,3 +64,11 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
res.status(200).json({ok: true});
}
export const config = {
api: {
bodyParser: {
sizeLimit: "20mb",
},
},
};