Important: Please read the 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!


  • Moderators

    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