finalize_image_upload
Confirm and complete an image upload after the file is placed in storage. Verifies the object, saves it to the media library, and returns a media ID and public URL for quiz or landing-page covers.
Instructions
Step 2 of 2 for adding an image: call this AFTER you have PUT the file to the uploadUrl returned by prepare_image_upload. It verifies the uploaded object in storage, records it in the team media library and returns a media id + public URL. To use the image as a quiz cover or a landing-page cover, call update_form with flagImg or landingImage set to the returned media id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alt | No | Optional alt text for the image. | |
| key | Yes | The object key returned by prepare_image_upload. | |
| filename | Yes | Original filename for admin display / download (same value passed to prepare_image_upload). | |
| mimeType | Yes | Image MIME type used at prepare time. Must be one of image/png, image/jpeg, image/gif, image/webp. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Permanent object key | |
| url | No | Public URL of the stored image | |
| mediaId | No | Media id — pass it to update_form as flagImg / landingImage | |
| filename | No | Original filename | |
| filesize | No | Size in bytes, as measured on storage | |
| mimeType | No | Detected image MIME type |