ICMediaFileManager

Manages the process of uploading and downloading content for media file attachments.

downloadFile

Downloads a file from a URL.

Operates asynchronously and notifies the result via ICFileDownloadCallback

  Syntax: void downloadFile(URL url, ICFileDownloadCallback callback)

  Parameters:

ParameterTypeDescription
urlURLThe URL of the file to be downloaded.
callbackICFileDownloadCallbackInvoked to report the result of the operation.

getCachedFile

Used to obtain a previously downloaded file from the local file cache.

  Syntax: File getCachedFile(URL url)

  Return Value: A File instance, if the download exists in the cache, otherwise null.

  Parameters:

ParameterTypeDescription
urljava.net.URLThe URL to be checked.

isFileDownloading

Checks if the manager is currently downloading a file for the given URL.

  Syntax: boolean isFileDownloading(java.net.URL url)

  Return Value: True if the file is currently being downloaded.

  Parameters:

ParameterTypeDescription
urljava.net.URLThe URL of the file that will be checked.

isFileUploading

Checks if the manager is currently uploading a file to the Webex Connect platform.

  Syntax: boolean isFileUploading(File file)

  Return Value: True if the file is currently being uploaded.

  Parameters:

ParameterTypeDescription
fileFileThe local file to be checked.

uploadFile

Used to upload a file to the Webex Connect platform.

This method attempts to infer the mime type of the file from the file extension, for more granular control use uploadFile(File file, String mimeType, ICFileUploadCallback callback)

  Syntax: void uploadFile(File file, ICFileUploadCallback callback)

  Parameters:

ParameterTypeDescription
fileFileThe local file to be uploaded.
callbackICFileUploadCallbackInvoked to report the result of the operation.

uploadFile

Used to upload a file to the Webex Connect platform.

  Syntax: void uploadFile(File file, String mimeType, ICFileUploadCallback callback)

  Parameters:

ParameterTypeDescription
fileFileThe local file to be uploaded.
mimeTypeStringThe mimeType of the file.
callbackICFileUploadCallbackInvoked to report the result of the operation.

regenrateMediaURL

Regenerates new media URL for given Media URL upon checking expiry.

Syntax: void regenerateMediaURL(URL url, ICRegenerateMediaURLCallback callback)

ParameterTypeDescription
urlURLMedia url
callbackICRegenerateMediaURLCallbackInvoked to report the result of the operation.