-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
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
Error thrown while trying to select png file #315
Comments
Remove the entire following line in your plugin setting and check
|
Anyway - I will try to provide a fix for this exception message. |
You may check now with the updated code from dev-master. |
Works now. Thanks. |
Hi, I have exactly the same problem $form->field($imageModel, 'networkLogo')->widget(FileInput::classname(), [ Uncaught TypeError: Cannot read property 'width' of undefined |
plugin version 4.2.1, tested on both .min and not
jquery version 2.3.1
bootstrap version 3.3.4
By selecting I mean selecting file via system/browser build-in file dialog.
my input definition:
While trying to select PNG image, below error is thrown (jpg and gif works fine):
Uncaught TypeError: Cannot read property 'width' of undefined @ fileinput.js:1658
FileInput.previewDefault @ fileinput.js:1658
FileInput.readFiles.throwError @ fileinput.js:1741
readFile @ fileinput.js:1772
FileInput.readFiles @ fileinput.js:1851
FileInput.change @ fileinput.js:1956
jQuery.extend.proxy.proxy @ jquery-2.1.3.js:512
jQuery.event.dispatch @ jquery-2.1.3.js:4430
jQuery.event.add.elemData.handle @ jquery-2.1.3.js:4116
File preview is not shown if you select only one PNG. If you select working extension as first (for example jpg and gif and then PNG) you will end up with 2 image previews and below message:
"Loading file 2 of 3 - aaa.gif - 50% completed." and ofcourse mentioned js error.
The text was updated successfully, but these errors were encountered: