Page MenuHomePhabricator

Allow MediaUploader to be embedded in a dialog
Open, LowPublic


Currently both the 2010 wikitext editor and VE/2017 wikitext editor use the core's upload dialog that lets user upload files in the editor and immediately start using them. It looks like this:

image.png (958×1 px, 152 KB)

It would be nice if we could substitute this rather simplistic dialog with the full MediaUploader. This would require a few things:

  1. Ensure the uploader can fit in the window – resolve T274894 first.
  2. Move all HTML generation from PHP to JS so the form can be dynamically included.
  3. Resolve any potential issues with dependencies in the special page code. For example, we would probably need a new way of retrieving the config, through a specialized API endpoint maybe – investigate.
  4. Look into a reasonable way to replace the upload dialog when MediaUploader is loaded. Ideally, extensions like VisualEditor would not have to know about MediaUploader. Instead, core should present an abstract uploader interface that would be implemented by both us and the built-in upload dialog.