0

I am trying to polish the video upload process for my TinyMCE setup.

I have managed to get the videos to upload via my upload script (as opposed to uploading as a blob) by using the answer at https://stackoverflow.com/a/68182918

I would like to have a progress bar shown when uploading. Based on https://www.tiny.cloud/docs/tinymce/6/upload-images/#images_upload_handler I tried to add

xhr.upload.onprogress = function (e) {
    progress(e.loaded / e.total * 100);
};

from within the file_picker_callback function, after the xhr.open('POST', '/your-endpoint'); line, but I just get errors that progress is not defined, because the progress callback does not get passed to file_picker_callback.

How can I show a progress bar (presumably one built in to TinyMCE) for the upload from file_picker_callback?

Ben Holness
  • 2,457
  • 3
  • 28
  • 49

0 Answers0