mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2026-03-10 13:15:05 +00:00
Fix not image not uploading when deployed
This commit is contained in:
@@ -355,7 +355,7 @@ exports.uploadProfileImage = (req, res) => {
|
||||
busboy.on('finish', () => {
|
||||
admin
|
||||
.storage()
|
||||
.bucket()
|
||||
.bucket("twistter-e4649.appspot.com")
|
||||
.upload(imageToBeUploaded.filepath, {
|
||||
resumable: false,
|
||||
metadata: {
|
||||
@@ -378,9 +378,5 @@ exports.uploadProfileImage = (req, res) => {
|
||||
return res.status(500).json({ error: 'something went wrong' });
|
||||
});
|
||||
});
|
||||
try {
|
||||
busboy.end(req.rawBody);
|
||||
} catch (err) {
|
||||
return res.status(500).json({error: err});
|
||||
}
|
||||
busboy.end(req.rawBody);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user