The attach function is established to download a file or a folder.
var result1 = (new Result())
.attach("test1.xls")
.attach("test2.xls");
var result2 = (new Result())
.attach("temp/test1.xls","temp")
.attach("temp/test2.xls","temp");
Calling | Returning |
Result . attach ( path ) | Result |
Result . attach ( path, zipBasePath ) | Result |
Result . attach ( path, zipBasePath, isAbs ) | Result |
Parameters | Type | Description |
path | String | File or folder path. |
zipBasePath | String | The root path of the zip for downloading. |
isAbs | boolean | The path is absolute path or a relative path to the storage. |