Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to attach a file when clicking on a button unsing QtWebEngine



  • Hi all,

    I want to know if there is way to attach file automatically to a website using QtWebEngine.
    In fact, I have to upload a file into a website when clicking on "upload button".
    I can emulate the button click, but I don't know how to attach the file.

    Thank you for your helps!

    93f8d0b7-d534-4ecd-a560-bf4626bd1035-image.png


  • Moderators

    @KLAI
    thats not possible for a reason!
    consider the security impact.

    Anyway you can emulate the form upload with an HTTP request. Depending if there are any other security/login mechanisms involved?

    Anyway if you really want you could intercept the FileDialog request (QML/C++), but anyway you can only return the path to the file.


Log in to reply