imageprompt

imageprompt Prompts the user for an image to be uploaded. It returns a cloudobject representing the new image the app will automatically process the image into three resolutions: the original, a "mid size" image, and a "thumbnail" image. The cloudobject created will be of a special type called "storedCloudImage", whose "url", "midsize_url" and "thumbnail_url" will be the URLs associated with the full size, mid size and thumbnail sized images.

If the user selects "cancel" then imageprompt will return FALSE. If imageprompt encounters an error, then it will return FALSE, an alert will be shown describing the error and the global variable "upload_error" will be set to the string describing the error.

Format:

image = imageprompt()

Parameters:

This function does not take any parameters.

Returned Value:

Type Description
cloudobject the storedCloudImage created (or FALSE if cancelled or upload failed)

Examples

 profile_image = imageprompt()
 if (upload_error) {
    alert(upload_error)
 }