I am aware of this question-Fineuploader - add jqCrop. However my challenge is that i do not want to use a generic file input that add jCrop as a listener.I am a newbie with FineUploader.Can some expert confirm if this is the most appropriate steps to follow.
form: {
element:document.getElementById('fileinput_inline')
}
$('#image_input img').Jcrop({
bgColor: 'black',
bgOpacity: .6,
setSelect: [0, 0, 100, 100],
aspectRatio: 1,
onSelect: imgSelect,
onChange: imgSelect
});
Use FineUploader Core form.element option to bind my file input to FineUpload
Use FineUploader validation options to validate size,filetype, etc
At the onSubmitted event ,retrieve the file id and use the drawThumbnail method to insert a preview in an image html element (
<img id='image_input'/>
)Introduce jCrop.
Submit the cropped Blob to Fine Uploade uploader.addBlobs({blob: croppedImageAsBlob, name: "my cropped image.png"});
Fire the upload to server