I'd like to save the video I uploaded in the Laravel storage folder, but for now I'm only able to save this away:
<p><video controls="controls" width="300" height="150">
<source src="data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGl</video></p>
I would like the url to be
`storage/video-name
. My current code is this:
file_picker_types: 'media',
file_picker_callback: function(cb, value, meta) {
var input = document.createElement('input');
input.setAttribute('type', 'file');
input.onchange = function() {
var file = this.files[0];
var reader = new FileReader();
reader.onload = function () {
var id = 'blobid' + (new Date()).getTime();
var blobCache = tinymce.activeEditor.editorUpload.blobCache;
var base64 = reader.result.split(',')[1];
var blobInfo = blobCache.create(id, file, base64);
blobCache.add(blobInfo);
cb(blobInfo.blobUri(), { title: file.name }); // here
};
reader.readAsDataURL(file);
};
input.click(); //here
},
How could I adapt my code so that I can save it in Laravel storage folder?
Laravel version: 8 Tinymce: 5