_setImage

Sets images for a company's profile.

Parameters

name

Which type of image is being set. Must be one of the following: app-header app-icon letterhead logo-square

Filedata

A Base64 data-uri string of the image data.

Example

Image used in this example is a 5x5 red dot, Filedata will usually have a much longer string for images.

FM_api(
    'Setting_setImage',[
      'name' => 'logo-square',
      'Filedata' => 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=='
    ]
);

Results

On Success

The 'num' value and 'img' content values can vary.

Examples:

Img contents (user id, image type, image name) are included if the format is logo-square or letterhead.

If the type is 'app-icon' or 'app-header':

On Failure

If there is no "name" parameter set

If the "name" parameter does not match any of the formats

If there is no "Filedata" parameter set

If the "Filedata" string cannot be recognized as an image

Last updated