Solved some more bugs and styling
This commit is contained in:
@@ -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",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user