singleRequest

defines whether files are sent in one request

boolean singleRequest;

Example

var vault = new dhx.Vault("vault_container", { 
    uploader:{
        // obligatory, the path for upload
        target:"/upload"
        singleRequest:true
    }
});


Default value:

false

Related samples

Details

Note that to receive download links after upload you need to:

  • enable updateFromResponse
  • configure your server to return data for each uploaded file in the response

The server must return a single JSON object with the following structure:

{
  "<file_id>": {
    "link": "<download_url>",
    "status": "<status>"
  }
}

where:

  • <file_id> is the temporary file ID sent from the client
  • link is the download URL for the file
  • status is the upload result returned by the server ("uploaded" or "failed")

For example:

{
  "u1776937904848": {
    "link": "/files/simple2.txt",
    "status": "uploaded"
  },
  "u1776937904849": {
    "link": "/files/simple1.txt",
    "status": "uploaded"
  }
}
See also
Back to top