-
-
Notifications
You must be signed in to change notification settings - Fork 921
Closed
Description
When I upload a file image, i get this error
Error: TypeError: data.image.toBlob is not a function
$('.wrapper').on('change', 'input[type=file]', function(e) {
loadImage(e.target.files[0], { meta: true })
.then(function (data) {
if (!data.imageHead) throw new Error('Could not parse image metadata')
return new Promise(function (resolve) {
data.image.toBlob(function (blob) {
data.blob = blob
resolve(data)
}, 'image/jpeg')
})
})
.then(function (data) {
//here i try to get data.blob
})
.catch(function (err) {
console.error(err)
});
});
Metadata
Metadata
Assignees
Labels
No labels