Skip to content

Instantly share code, notes, and snippets.

@digilord
Created December 28, 2013 00:03
Show Gist options
  • Select an option

  • Save digilord/8154309 to your computer and use it in GitHub Desktop.

Select an option

Save digilord/8154309 to your computer and use it in GitHub Desktop.
Template.s3progress.helpers({
progress: function () {
var file_name = Session.get('s3-file-name')
console.log(file_name);
if(file_name != null){
var file = S3files.findOne({file_name: file_name});
if(file){
console.log(file);
var percent = file.percent_uploaded
if(percent)
return percent
}
}
return 0;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment