Please see the following how the console works with documents.
In Console as far as I can see when you add documents in console there is information going to 3 tables. .
1. km_document, where there is information about the file type and the attachment data is stored in a xml string.
3. tps_attachment which stores the attachment.
So this behaviour would be difficult to replicate in WebDesk but would be a good enhancement.