I work on a custom Joomla module that would let users to upload profile images. I created a JForm and wanted to use the form field type "file" as below:
<field name="Photo" type="file" label="Profile photo" size="10" accept="image/*" /> <field name="MAX_FILE_SIZE" value="5242880" type="hidden" />
The form looks good and I can browse any images from my computer and submit the form. However when I dump the posted fields, I can see that my photo field has a simple string with the name of the image, not even the path of it.
What I'd like to do is to grab that image, check if it is safe, upload it and put it into a specified Joomla folder under the images folder.
This sounds like a common use case, but I was not able to find any description explaining the whole chain. So any hints, links, explanation, code samles would be higly appreciated.
Thanks a lot, w.