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

Help with Upload Folders in JavaScript

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 308 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.
  • S Offline
    S Offline
    subabrain
    wrote on 28 May 2020, 11:40 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

    1/1

    28 May 2020, 11:40

    • 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