VisualEditor: Initiate file upload by drag-and-drop
Closed, ResolvedPublic8 Story Points

Description

Once basic image support is included, and there's some integration with UploadWizard or similar, it should be possible to initialize the upload tool with drag-and-dropped image files.

This would allow simply dragging one or more files from your file manager over to the spot in the document where you want them, ending up with a single image or gallery at the end.

Compared to T40030: Way in VisualEditor to initiate Commons file uploading, and insert image on completion, needs to be able to initialize the wizard with given File objects received via a drop.

See also: T11133: Drag and drop uploading

bzimport set Reference to bz38031.
brion created this task.Jun 28 2012, 5:20 PM

This is not on schedule for before the next big release; noting as such.

Request for similar functionality made at MediaWiki today:

Hi, I see a number of requests for the ability to easily upload local images (from our local HD to Wiki I guess). I'd like to add my vote for this request. How is this progressing? How would it work? Simply browse for an image locally and then go through the captioning, sizing, aligning, positioning, licensing — then upload for it to appear immediately in the desired location with also the hi-res and info immediately in Wikimedia Commons?

Robertwhyteus (talk)‎20:27, 9 July 2013

brion added a comment.Jul 10 2013, 5:23 PM

I think roughly what we'd want to happen is something like this:

  • user drag-and-drops an image file from Explorer/Finder/file manager into the document.
    • if possible, show a rectangular placeholder box around the cursor position while dragging
  • on drop, save the cursor position so we know where in the document to insert...
  • ...and spawn the UploadWizard or similar interface, handing it the file we've received to start the actual upload process, select a license, save a description etc.
  • At the end of the UploadWizard, instead of showing you the link to the file we transition straight back to the editor...
  • ...and you can then modify the positioning/sizing/caption/etc with the VisualEditor's existing dialogs.

If using UploadWizard itself is not feasible at this stage, a lightweight uploader UI similar to what's available on mobile might be good -- this does a cross-origin POST to Commons for the upload, so we don't have to leave the page or open an iframe or anything weird like that.

(In reply to comment #3)

If using UploadWizard itself is not feasible at this stage, a lightweight
uploader UI similar to what's available on mobile might be good -- this does
a cross-origin POST to Commons for the upload, so we don't have to leave the
page or open an iframe or anything weird like that.

Opening up an iframe isn't too hard for VisualEditor (every dialog is one already), but re-using UploadWizard (and refactoring it so this is possible) seems like a much better solution than writing our own.

There's wider product questions about whether to allow uploading to local, or just to Commons (given that relatively few wikis allow local uploads, and that those are only meant to be used in special circumstances, making it too easy to upload copyvios/etc. and having licence proliferation might be the wrong approach).

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 29 2015, 6:45 PM
Restricted Application added a subscriber: Matanya. · View Herald TranscriptSep 15 2015, 3:44 PM
Jdforrester-WMF moved this task from Untriaged to Next up on the Multimedia board.Sep 15 2015, 3:44 PM

VE's drop handler needs a list of allowed file extensions on the target remote wiki. You can get this via the API – http://commons.wikimedia.org/w/api.php?action=query&meta=siteinfo&siprop=fileextensions – but we'll need T114765 before we can scrape it. It also/instead needs a list of MIME types; not sure if that's possible in MW, sadly.

Jdforrester-WMF raised the priority of this task from "Low" to "High".Oct 7 2015, 2:11 AM

Change 244331 had a related patch set uploaded (by Esanders):
Media upload: Initiate upload process on image drop

https://gerrit.wikimedia.org/r/244331

Jdforrester-WMF edited a custom field.Oct 7 2015, 8:37 PM
Jdforrester-WMF assigned this task to Esanders.
Jdforrester-WMF added a project: User-notice.
Johan moved this task from Not ready to announce to To Triage on the User-notice board.

Change 244331 merged by jenkins-bot:
Media upload: Initiate upload process on image drop

https://gerrit.wikimedia.org/r/244331

Jdforrester-WMF closed this task as "Resolved".Oct 13 2015, 6:30 PM
Jdforrester-WMF removed a project: Patch-For-Review.

Change 246185 had a related patch set uploaded (by Prtksxna):
Media upload: Initialize booklet before setting file on drag drop

https://gerrit.wikimedia.org/r/246185

Change 246185 merged by jenkins-bot:
Media upload: Initialize booklet before setting file on drag drop

https://gerrit.wikimedia.org/r/246185

Add Comment