Marius Dumitru Florea said:
[...] This works pretty well, but at the end of the upload I temporarily get a div appear below the widget containing a fully rendered wiki page. How do I prevent this, or rather how do I configure things so that I can display something more useful?
See https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform- core/xwiki-platform- web/src/main/webapp/resources/uicomponents/widgets/upload.js#L387 . It could be the "responseURL" option which is used here https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform- core/xwiki-platform- web/src/main/webapp/resources/uicomponents/widgets/upload.js#L466 . When not specified (empty) it is probably "resolved" as the current page URL, leading to a redirect to the current page after the file is uploaded.
Hope this helps, Marius
Thanks Marius. I think you're right, but I can't follow how xredirect gets used subsequently. I'm not sure what the purpose of it is - perhaps to allow display of an image for the uploaded file? I wondered whether I could prevent anything being displayed by just setting responseURL to '' but this doesn't appear to change anything. Any ideas?