• Parameters

    Returns Promise<IUploadImageResponse>

    Description

    Upload a image to get image url for sending image message

    Since

    0.1.0

    Async

    Example

    // For Web usage
    // get the image blob data from image uri, uri could be local file uri
    const imageBlob = await fetch(imageUri).then(res => res.blob())
    // create formdata and append "type" and "image" keys
    const imageFormData = new FormData();
    imageFormData.append('type', 'file')
    imageFormData.append('image', imageBlob)

    const { image_url } = await uploadImage({
    roomId: "a147f914-d474-4cfb-81c6-4099404c435a",
    imageFormData: imageFormData
    });

Generated using TypeDoc