I am using the following code to upload a base64 string of an mp4 video. I can print the string to the console and this code works in Chrome but when I run this in safari, context.uploadContent does not return a URL or err.
I only ever see starting upload
and finish
. I don’t see the items in the callback function
Any thoughts or follow up questions?
function(instance, properties, context) {
var reader = new FileReader();
reader.readAsDataURL(instance.data.recordedBlobs[0]);
reader.onloadend = function() {
var base64String = reader.result;
let string = base64String.split(',')[2]
console.log('starting upload')
context.uploadContent('video.mp4', string, function(err, url) {
console.log('in upload handler')
if (err) {
console.log(err)
} else {
console.log('success')
console.log(url)
}
})
console.log('finish')
}
}