In This Topic
Sends an asynchronous request to a server for downloading a file from a server.
Syntax
var value; // Type: any
// Parameters
var fileId; // Type: string
var successFunc; // Type: object
var errorFunc; // Type: object
var service; // Type: object
value = Vintasoft.Imaging.VintasoftFileAPI.downloadImageFile(fileId, successFunc, errorFunc, service);
function downloadImageFile(
: string,
: object,
: object,
: object
) : any;
Parameters
- fileId
- Image file identifier.
- successFunc
- Function that will be executed if request is executed successfully.
Here is function prototype "function __success(data)".
The data parameter has the following properties:
- filename (string): File name.
- blob (object): Blob object that contains file.
- xmlHttpRequest (object): XmlHttpRequest object.
- errorFunc
- Function that will be executed if request is failed.
Here is function prototype "function __error(data)".
The data parameter can be:
- An object with following properties:
- errorMessage (string): Error message.
if exception is catched inside web service.
- Otherwise, ProgressEvent object.
- service
- An instance, of WebServiceJS class, which will serve the request of this function.
Browser Compatibility
See Also