mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2025-12-15 18:08:46 +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', () => {
|
||||
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);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user