Meteor-cfs-gridfs images does not display in react when uploaded from mobile


While uploading the image from mobile using Gridfs, image is not showing on the browser.

I use the following code to upload image :-"createUser", userData, password, function(err, id){
       Bert.alert("Error while creating mentor user. ","danger");
         Images.insert(file, function(err, fileObj) {
            Bert.alert("Error while uploading image. ","danger");
            console.log("Success -> File Id: ->", fileObj._id);
"saveImage", fileObj._id, id);          
       }else{"defaultImage", id);         

Save image id in the profile of user:-

saveImage: function(fileId, id){
        Meteor.users.update({_id: id},{
          $set: { "profile.image": fileId } 

code to display the image on page :-{
 return (
  <div key={img._id}>
    <img src={img.url()} className="img-responsive" alt="Invalid Image" />

The code is working fine while uploading the image from web browser, but not on mobile browser.
Kindly help on the above issue.


Any solution/clue for this issue?


You have to do something with your mobile config. You have to something like


You may have to do something similar with Browser Policy.


I had this issue before and the solution was something related to this. I don’t have any source files handy on me, so I can’t verify what the exact solution was, but this should hopefully give you a starting point.


We are facing this issue in web app on mobile. It’s not a cordova app :frowning: