tomitrescak / meteor-uploads

MIT License
295 stars 41 forks source link

my template automatically refreshing after upload #200

Closed pvtulsiram538 closed 8 years ago

pvtulsiram538 commented 8 years ago

Hi , My template automatically refreshing after upload .I used following code

{{> upload_bootstrap fileTypes='.jpg' multiple=true callbacks=myCallbacks}}

and i write my callback is myCallbacks: function() {

return {

    finished: function(index, fileInfo, data) {
    // console.log("FileInfo--------"+fileInfo.status);
    console.log("campaignId--in image helper--------"+currentCampaignId);  
   //  var campaignObj=currentCampaignId;
              addImageDetails(fileInfo, currentCampaignId,function(result) {
            if (result) {
                console.log("image record------"+result);
                 }
                 else
                    alertify.alert("Failed");
        });

 }

}

}

tomitrescak commented 8 years ago

Make sure you are not uploading to any meteor directory e.g. public

yoepus commented 8 years ago

Thanks @tomitrescak I just had the same issue and this solved it.

pvtulsiram538 commented 8 years ago

HI tomitrescak ,

Thank you so much . Now its working fine but how could i display the files in template . And if i store files in side my application .it may reduce performance of my server how could i solve it .Can you please help me out

Thanks