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
Forum Updated to NodeBB v4.3 + New Features

webkitRelativePath is null

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 368 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.
  • E Offline
    E Offline
    elicat
    wrote on 13 Feb 2024, 07:52 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

    1/1

    13 Feb 2024, 07:52

    • Login

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