Releases: jamgold/cropuploader
Exif support for mobile
roles and collection hooks
Check for the right roles to modify derivatives (admin role) and use collection hooks to remove derivatives
0.0.4_1
0.0.4
0.0.3_4
Bug fix
Changed to MIT License
0.0.3_2 changed to MIT license
Now support for uploaded event and canvasID
You can now provide your own ID for the canvas by specifying it with canvasID="yourID" when calling the cropUploader template
<template name="my_public_images">
{{>cropUploader canvasID="public_preview" ...}}
</template>
the preview for the selected file will always be rendered into that canvas. Once you hit the upload button, the cropUploader package will generate the defined derivative and upload it and the original to S3. Upon success it will trigger uploaded on the canvas DOM element. You can catch it with an event map like so
Template.my_public_images.events({
'uploaded #public_preview': function(event, target) {
// react to successful upload
}
});
In case of an error, it will set CropUploader.errorMessage. You can define an autorun to react to it
Template.my_public_images.onCreated(function(){
this.autorun(function(){
var error = CropUploader.errorMessage.get();
// deal with the error
});
});
Support hooks and additional values stored with the document
This release supports additional values to be stored with the saved image document, so when rendering the cropUploader like
{{>cropUploader thumbnailWidth=100 thumbnailHeight=100 imagetype="avatar"}}
the saved images can be recalled with
CropUploader.images.find({imagetype:'avatar',userId: Meteor.userId()});
Initial Release
cropuploader