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. Help with Upload Folders in JavaScript
Qt 6.11 is out! See what's new in the release blog

Help with Upload Folders in JavaScript

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 485 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.
  • subabrainS Offline
    subabrainS Offline
    subabrain
    wrote on last edited by subabrain
    #1

    Hello,

    this is my last Chance to get my JavaScript Sourcecode for Uploading Folders in qtwebengine.

    It works with the code:

    function uploadFiles(files) {
    
        // Create a new HTTP requests, Form data item (data we will send to the server) and an empty string for the file paths.
        var xhr = new XMLHttpRequest();
        var data = new FormData();
        var paths = "";
    
        // Loop through the file list
        for (var i in files) {
            // Append the current file path to the paths variable (delimited by tripple hash signs - ###)
            paths += files[i].webkitRelativePath + "###";
            // Append current file to our FormData with the index of i
            data.append(i, files[i]);
        };
        // Append the paths variable to our FormData to be sent to the server
        // Currently, As far as I know, HTTP requests do not natively carry the path data
        // So we must add it to the request manually.
        data.append('paths', paths);
    
        // Open and send HHTP requests to upload.php
        xhr.open('POST', "ajax/progress_ordner.php", true);
        xhr.send(data);
    
    }
    

    the Code works fine in all Browsers including Chrome/Chromium on Windows but in QTWebEngine (on Windows too) there are no "files[i].webkitRelativePath" entries...

    please help!

    Greets
    Robert

    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