fires when a single file from the list was uploaded to the server
file | object | an object with file details |
extra | object | optional, an object with extra information from server |
myVault.attachEvent("onUploadFile", function(file, extra){
// file is an object with details
{
id: 123, // number, internal file ID
name: "fname.ext", // string, filename detected by browser
serverName: "fname2.ext", // string, filename returned by server
lastModifiedDate: Date, // date object if retrieved
size: 132500, // number, file size in bytes
uploaded: true, // boolean, true/false
error: false // boolean, error while uploading, if any
}
// extra - sends extra information from the server to the client
// assuming that server returns the following json:
{
state: true,
name: "filename.jpg",
extra: {
info: "just a way to send some extra data",
param: "some value here"
}
}
// then extra on client will be:
{
info: "just a way to send some extra data",
param: "some value here"
}
});
This API page is for Vault v2.5. Please go to docs.dhtmlx.com/vault/ to see API reference for the current version of dhtmlxVault.