jQuery UI Widgets Forums Angular jqxFileUpload RESTful API

This topic contains 1 reply, has 1 voice, and was last updated by  a2m developer 6 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • jqxFileUpload RESTful API #96369

    a2m developer
    Participant

    API issue.. please ignore. 🙂

    jqxFileUpload RESTful API #96370

    a2m developer
    Participant

    Ok Update: At first I thought it was a component issue, and then I thought it was API but in fact it was neither.

    My API is expecting to handle multiple files at one time requiring the filename attribute to be an array (or actually a string that acts as an array when rendered) not just a string.

    Long story short.. too late.. the documentation for the jqxFileUpload could use a little help. Especially with the “multipleFilesUpload” defaulting to true, it’s a little confusing.

    Example:
    `<jqxFileUpload #fileUpload [fileInputName]=”‘uploadFiles'”>
    </jqxFileUpload>`

    Single file format from my PHP API:

    array(1) {
      ["uploadFiles"]=>
      array(5) {
        ["name"]=>
        string(16) "testing.txt"
        ["type"]=>
        string(10) "text/plain"
        ["tmp_name"]=>
        string(14) "/tmp/phpmovWAm"
        ["error"]=>
        int(0)
        ["size"]=>
        int(153)
      }
    }

    Example:
    `<jqxFileUpload #fileUpload [fileInputName]=”‘uploadFiles[]'”>
    </jqxFileUpload>`

    Multiple file format from my PHP API:

    array(1) {
      ["uploadFiles"]=>
      array(5) {
        ["name"]=>
        array(1) {
          [0]=>
          string(16) "testing.txt"
        }
        ["type"]=>
        array(1) {
          [0]=>
          string(15) "application/pdf"
        }
        ["tmp_name"]=>
        array(1) {
          [0]=>
          string(10) "text/plain"
        }
        ["error"]=>
        array(1) {
          [0]=>
          int(0)
        }
        ["size"]=>
        array(1) {
          [0]=>
          int(100194)
        }
      }
    }

    Seriously hope this helps someone else, cause it drove me crazy for a good day. 🙂

    Happy coding!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.