Skip to content
Advertisement

Insert a Json object in MongoDB from Laravel 7

I need upload a image to Google storage and insert the below JSON object with the gcs image path in MongoDB.

The image is successfully getting uploaded in GCS, but I am not able to get the image url of the image and also not able to update the path in mongoDB.

JSON object format

JavaScript

Can anyone help me to implement the this logic.

JavaScript

Thanks in advance

Advertisement

Answer

Finally I fixed it using below code .

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement