Download

To download a file, you can provide the following input:

  • downloadURL. (String) (Optional) If you requested this value from the list request, send it to the server and it will save the step of fetching this URL. If you do not pass a value, the URL will be fetched by AIS.

  • sequence. (int) (Required) The sequence number of the attachment for this media object record.

  • height. (int) (Optional) If the file you are downloading is an image, the AIS Server will scale the image to the requested height.

  • width. (int) (Optional) If the file you are downloading is an image, the AIS Server will scale the image to the requested width.

  • fileName. (String) (Required) Provide a name for the downloaded file, if desired you can use the same name returned in the list response.

The code in Example - Media Object Download is an example of downloading a media object attachment. Executing the getMediaObjectList operation produces a FileAttachment object that contains the sequence and media object file name. It passes the FileAttachment object into this method where a call is made to downloadMediaObject operation (passing a desired file location). The response will include the location of the saved file.