theme_material | Material Theme For Quokka CMS Front End | Content Management System library
kandi X-RAY | theme_material Summary
kandi X-RAY | theme_material Summary
Material Theme For Quokka CMS Front End
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of theme_material
theme_material Key Features
theme_material Examples and Code Snippets
Community Discussions
Trending Discussions on theme_material
QUESTION
I am developing my app using the yii2-formwizard widget. I have gotten it working fine in all the other parts and even submits a single image perfectly. The problem comes when I try to submit multiple images. I get the $_POST
array with form model values and the image model as an empty array inside the $_POST
, but then all the image model values are wrapped in an array of $_FILES
. How do I go about solving this as I have never dealt with such before? Here are the relevant codes:
_form view
...ANSWER
Answered 2018-Dec-02 at 21:50i created this extension a few months back. The files that you submitted will be in the $_FILES
array and not the $_POST
and you need to call the UploadedFile::getInstances('image')
to get all the images you selected to upload and then iterate on them to upload, you can access all the properties listed here for every image.
And you are not creating the new object every time you are inserting the image inside the foreach ($_FILES['ListingImages']['name']['image'] as $key => $image) {
which will show only the last image inserted , your $imageModel
is initialized in the start of the action whereas you should have it inside the foreach
too
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install theme_material
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page