I'm using fine uploader to upload files onto my amazon s3 and i'm taking advantage of the new image scaling option. In the fine uploader docs it mentions:
calling getFile on a scaled image will still return the original file.
Is it possible however for me to call getFile
on the scaled image somehow as well in perhaps a different call?
The reason being that after it is submitted i am drawing the image onto canvas using html5 and fabricjs and running into the iOS squashed ratio bug and as i am uploading to s3 i get cross origin security errors for the common hacks/fixes mentioned. I know that if i can use the getFile response of the scaled image rather than the original then the problem doesn't come up as the image is small enough not to be effected by safari.
So is it possible to somehow call getFile on the scaled image?
My fine uploader setup is below:
jQuery("#fine-uploader").fineUploaderS3({
...
scaling: {
sendOriginal: false,
sizes: [
{name: "ios", maxSize: 500}
]
},
objectProperties: {
key: function (fileId) {
var filename = jQuery('#fine-uploader').fineUploader('getName', fileId);
var uuid = jQuery('#fine-uploader').fineUploader('getUuid', fileId);
var ext = filename.substr(filename.lastIndexOf('.') + 1);
//return item_number + uuid + '.' + ext;
return item_number + '.' + ext;
}
}
}).on('submitted', function(event, id, name) {
var file = jQuery('#fine-uploader').fineUploader('getFile', id);
drawOntoCanvas(file);
});