by returning existing promises and by using _converse.api.sendIQ
Attach a file by drag & drop or click to upload