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