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. webkitRelativePath is null
Qt 6.11 is out! See what's new in the release blog

webkitRelativePath is null

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 748 Views 1 Watching
  • 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.
  • elicatE Offline
    elicatE Offline
    elicat
    wrote on last edited by
    #1

    Good morning everyone,
    there is a way to enjoy the property webkitdirectory in element html type file

    <input type="file" id="filepicker" name="fileList" webkitdirectory multiple />
    

    If I use it outside a QtWebengine project I can select the chosen folder if it contains at least one file. Example code js : https://codepen.io/simevidas/pen/ZJjmWG

    picker.addEventListener('change', e => {
      for (let file of Array.from(e.target.files)) {
        let item = document.createElement('li');
        item.textContent = file.webkitRelativePath;
        listing.appendChild(item);
      };
    });
    

    The same javascript function in a page in qtwebengine returns the null value:

    1: File
    lastModified: 1692711081402
    lastModifiedDate: Tue Aug 22 2023 15:31:21 GMT+0200 (Ora legale dell’Europa centrale) {}
    name: "alertblack.png"
    size: 895
    type: "image/png"
    webkitRelativePath: ""
    

    Does anyone know if I need to set something at project startup? Does the problem solve?
    Thank you

    Saluti, Gianfranco Elicat

    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