Image.createFromData (Method)
Create a base64 representation of an image and assigns it the attributes contained within this method's arguments.
Returns:
ImageID (integer)
Arguments:
Name | Type | Required | Description |
---|---|---|---|
subsiteIDOrURL | SubsiteIDorURL_EmptyString | Required | The ID of the target subsite, or the server relative path to the target subsite, or an empty string for the current subsite. |
fileName | ImageFileName | Required | The image's filename. |
title | PlainText_255 | Optional. Defaults to an empty string. | The image's title. |
encodedImageData | Base64Data | Required | Base 64 encoded image data. |
categoryID | ImageCategoryID | Required | The ID of the image category. |
description | PlainText_NonNull_255 | Required | The image's description. |
galleryID | ImageGalleryID | Optional. Defaults to '2'. | ID of the image gallery in which to add the image. |
metadata | MetadataValueArray | Optional. Defaults to '#ArrayNew(1)#'. | An array of MetadataValue structures that describe the metadata for the image, or an empty array if no metadata is specified. |
isTransparent | Boolean | Optional. Defaults to '0'. |
Context:
License Requirements | None |
Permission Requirements | subsite:UploadImages |
Deny Context | None |
Require Context | AuthoringEnabled |
Author Lock | (not required) |
Transaction Logging | If transaction logging is enabled at the site level, calls to this method will be logged |
Customization | This method may be customized at the site level |
Error Codes:
Code | Error Message |
---|---|
1000406 | You do not have sufficient permissions to upload the specified file type. |
1000407 | $1 |
Notes:
None