Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. File is not attached to <input type="file"> or javascript triggered

File is not attached to <input type="file"> or javascript triggered

Scheduled Pinned Locked Moved Unsolved QtWebEngine
2 Posts 1 Posters 369 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    olliekav
    wrote on last edited by olliekav
    #1

    So I have a basic HTML page in a QTWebengine view, with a form that contains an <input type="file">. Form submission works fine but I cannot attach a file to the form. I'm presented with the permissions window (on MacOS) to access the current folder but when selecting a file it is not attached. The javascript change event is never triggered either...

    document.querySelector('.form__input--file');
    fileInput.addEventListener('change', function(e) {
    if(fileInput.files && fileInput.files[0]) {
    ...
    }
    });
    

    I've tried playing with the various security settings, --disable-web-security and...

    settings.allowRunningInsecureContent: true
    settings.allowWindowActivationFromJavaScript: true
    settings.localContentCanAccessRemoteUrls: true
    settings.localContentCanAccessFileUrls: true
    

    with no success. I'm struggling to find any documentation around this and wondering if it is even possible? This is on QT 5.14.2

    1 Reply Last reply
    0
    • O Offline
      O Offline
      olliekav
      wrote on last edited by
      #2

      Digging into this a little bit more, drag & drop onto the file input works fine, but not the base functionality which feels like a bug?

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved