Open dvdmtw98 opened 5 months ago
This is a use-case I didn't envisioned at first, but it makes sense. I wanted to enhance the file input output for some time now, this is just another improvement to add to the list. Maybe a dedicated image input will make sense, but that could be confusing because I think people will think it could be used to import images...
If a new input for images is added then I feel a additional input type will have to be created for documents like PDF as well since they can also be embedded.
One way to implement it could be to ask the user to define the type of files that will be returned by the input field. So when user selects type as images the field will only list the images. When user defines the type as documents files like PDF will be returned.
Either way as long as the extension is returned in the ResultSet
I have no problem. Maybe the path to the file could also be added as a property which could be useful for certain workflows.
Is your feature request related to a problem? Please describe. I want to use Modal Form to have a user select a image which will then be embedded in the file. I have used the Select Field to limit the folders from which user can select the images. The image files show up in the drop down but the captured value does not contain the files extension because of this I cannot use the file name directly to create a image embed.
Describe the solution you'd like The Result Object could have a new property called extension which has the extension of the file that was selected by the user. A properly that has the filename along with the extension will also be fine.
Additional context
Since Modal Forms does not return extensions I have to use a hacky solution to be able to embed image.