Open image editor
- 18 May 2022
- 1 Minute to read
-
DarkLight
-
PDF
Open image editor
- Updated on 18 May 2022
- 1 Minute to read
-
DarkLight
-
PDF
Opens an image editor modal with the given input file.
Once the user has confirmed the edited image, the first output is triggered.
If the user cancels the image editor modal, the second output is triggered.
If there is an error, the third output is triggered.
By default, the original file is not overwritten, but instead a new file is created in the device temporary directory. If you need to persist the edited image, use the Move file flow function.
Input arguments
Label | Key | Type | Required? | Default | Description |
---|---|---|---|---|---|
Path to source image | source |
String(local-filesystem-reference) | Yes | – | Absolute local filesystem path to the image file to edit. |
Overwrite original file? | overwriteOriginal |
Boolean | Yes | – | If true , overwrites the original image file instead of creating a new file. |
Output arguments
Number of outputs: 3
Label | Key | Type | Description |
---|---|---|---|
Image file | imageFile
|
Object | Object representing the edited image file in the local filesystem. |
|
imageFile.path
|
String | Absolute local filesystem path representing the file location on the device, including the filename and extension. On web, this is created via the [`createObjectURL`](https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL) method. |
|
imageFile.mimeType
|
String | MIME type of the file, if it could be determined. |
|
imageFile.name
|
String | Name of the file in the local filesystem, if applicable. Note that the filename and extension are included in the **Local path** property already. |
|
imageFile.size
|
Number | Size of the file, in bytes. |
|
imageFile.createdAt
|
String | Creation datetime of the file, if it can be determined. |
|
imageFile.modifiedAt
|
String | Datetime when the file was last modified, if it can be determined. |
Events
No events.
Errors
Label | Code | Description |
---|---|---|
Unknown error | unknown |
Thrown if an unknown error occurred while opening the image editor. |
Was this article helpful?