UploadImage
Upload image assets in your LinkedIn organization which can be used to create posts or events.
Procedure Specific Information
To use this stored procedure, exactly one of the following parameters must be specified (in addition to OwnerURN):- LocalFile
- FileStream
- FileData
If no parameter is used, or more than one parameter is used, the procedure will fail.
Below are some other restrictions for image assets:
- Only images with a total pixel count (width X height) less than 36,152,320 are allowed.
- The following formats are supported: JPG, PNG, and GIF.
- For the GIF format, up to 250 frames can be used.
Input
| Name | Type | Required | Accepts Input Streams | Description |
| OwnerURN | String | True | False | The URN of the entity that will own the uploaded image asset. For event background images (when IsEventBackground=true), you must use a person URN (format: 'urn:li:person:{id}') representing your LinkedIn member account. |
| IsEventBackground | Boolean | False | False | Set this to true if the uploaded image will be used as an event background image. When true, the image is registered with specific dimensions and requirements for event headers. The resulting ImageURN can then be passed to the BackgroundImageURN parameter in the CreateEvent stored procedure. Event background images must be owned by a person URN, not an organization URN.
The default value is false. |
| LocalFile | String | False | False | The absolute path of the image file in your system to upload to LinkedIn. |
| FileStream | String | False | True | An 'InputStream' object to use for reading the data of the image to upload to LinkedIn. Useful when accessing files in your environment ('LocalFile' parameter) is not a viable option. |
| FileData | String | False | False | A Base64-encoded string containing the data of the image to upload to LinkedIn. Useful in cases when neither the 'LocalFile' parameter nor the 'FileStream' parameter are viable options. |
Result Set Columns
| Name | Type | Description |
| ImageURN | String | The URN of the new image asset that was created, if the upload was successful. |