Chithira Kumar M
Chithira Kumar M

Reputation: 51

where the images uploaded in tinymce are stored?

I have use tinyMCEeditor CDN in my laravel application

so i want to know, where the images uploaded in tinymce are stored?

file_picker_types: 'file image media',

        file_picker_callback: function (cb, value, meta) {
            var input = document.createElement('input');
            input.setAttribute('type', 'file');
            input.setAttribute('accept', 'image/*,audio/*,video/*');

            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
                    });
                };
                reader.readAsDataURL(file);
            };

            input.click();
        },

Upvotes: 0

Views: 77

Answers (1)

東雪蓮
東雪蓮

Reputation: 1

I suggest you use ajax and upload the picture to the server.

Upvotes: 0

Related Questions