Closed odesey closed 8 years ago
Solved this based on info found here #19
Changed this:
toDataUrl (cover._result, function( base64Img ) {
Cloudinary.upload( base64Img,{
folder: 'Books',
resource_type: 'raw',
},function(err, res){
if (err){
console.log(err);
} else {
console.log(res);
}
});
})
to this:
toDataUrl (cover._result, function( base64Img ) {
Cloudinary._upload_file( base64Img,{
folder: 'Books',
},function(err, res){
if (err){
console.log(err);
} else {
console.log(res);
}
});
})
Problem solved.
This should probably be in the documentation.
Awesome! Glad you solved it, I'll add it to the docs.
I am trying to extract some images from
.epub
files and then save them to Cloudinary but I am not having any luck. Here is what I've done thus far:Using
epub.js
I load the.epub
file and read the image data:I can manually assign
cover._url
to an image source and the image renders as expected:I have tried to upload the
cover._result
,"blob:http://localhost:3000/6433bd4e-13dc-462b-b7be-e9654ad06c18"
like so:and I get no response
I also tried this:
The file uploads, BUT its garbage data and not readable
Lastly I tried converting the file to base64 like so:
I get no response from the
Cloudinary.upload
function.So my question, is this even possible with the package? If so what am I missing?
Thanks.