We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
my AR:
public $pic_hold; ...... public function rules() { return [ ['pic_hold', 'file', 'types' => ['gif']], ]; }
and my view:
<?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); ?> <?= $form->field($model, 'pic_hold')->fileInput() ?> <?php ActiveForm::end(); ?>
If i trying to save jpeg, bmp, pdf, txt files - all of them succesful saving.
The text was updated successfully, but these errors were encountered:
i founded reason.if i write this in my controller:
$model->load($_POST); $model->pic_hold=UploadedFile::getInstance($model, 'pic_hold');
everything works.
Sorry, something went wrong.
Yes, this is the expected usage.
No branches or pull requests
my AR:
and my view:
If i trying to save jpeg, bmp, pdf, txt files - all of them succesful saving.
The text was updated successfully, but these errors were encountered: