Meteor cordova image share

I am building a METEOR app where users can click/upload images using camera and gallery. And other users should be able to see the image and download it. (same as whatsapp)

I have installed the following plugins :



Here’s my code :

var cameraOptions = {
    quality: 100,
    previewDrag: false,
    sourceType: sourcetype,
    correctOrientation: true,
    allowEdit: true,
    saveToPhotoAlbum : true,
    mediaType : Camera.MediaType.PICTURE,
    destinationType : Camera.DestinationType.FILE_URI,
    encodingType: Camera.EncodingType.JPEG,
    popoverOptions: CameraPopoverOptions
}; cameraSuccess(fileURI){
    resolveLocalFileSystemURL(dataURL, function(entry) {
		Session.set('imgData', entry.toInternalURL());			
}, function cameraError(error){
    Session.set('imgData', false);
}, cameraOptions);`

Session.get(‘imgData’) is passed as img src (image not rendering though)

I am getting the following error :

         "Not allowed to load local resource'"

I have inserted the following in my template head

        <meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline'; img-src * 'unsafe- 

Still the error persists.

Server-side code

        Media = new FS.Collection("media", {
stores: [new FS.Store.GridFS("media", {path: "~/uploads"})]

insert: function (userid, doc) {
  // add custom authentication code here
	return true;
download: function(userid, doc){
	return true;

Not sure how to proceed though. Any insights??

PS: future tasks include iploading video, pdf, docs and other files too. So an answer that also helps with that would be highly appreciated.

Where do you stuck exactly?

getting the error

“Not allowed to load local resource:’”

It seems that the required permissions to access photo library/camera or the file system are not addressed. Maybe this plug-in gives some insights for your implementation.