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
Runtime error when using getFileStack #1413
Comments
Can you share your plugin configuration and what you are trying to achieve? |
Here is my configuration. I am trying to get lastModified and size information from the file stack because I want to save that information in addition.
Runtime error is caused by the function getFileStack because of accessing undefined this.file property: fileinput.js:4707 Uncaught TypeError: Cannot read property 'stack' of undefined |
Check if this fix resolves your issue. Use |
Runtime error is gone, but contrary to the documentation it does not return an array any longer. It returns an object now which is a bit harder to consume. |
Ok, I made my code work again. Thanks for the quick fix. Maybe you want to change the documentation to tell it returns an object now? Or you want to continue to fix it to return an array again. This should be an associative one indexed by the fileId value which is part of the Ajax dataset. Makes it most easy to use. |
Thanks. The docs are updated. Note that if you need an array of file objects - use the |
getFileStack works like a charm with your $.each sample in the docs. Well done. Also thanks for the new getFileList section in the docs which explains that all the constraints for the result are the same as for getFileStack (validation errors, already uploaded). This was indeed not clear to me before. Anyhow, I will continue using the object result of getFileStack just because of the "never change a running system" reason. Again thanks for your great work, man. |
After updating form V4.5.3 I get runtime errors in my code when trying to use the function getFileStack.
I am under the impression that both functions 'getFileStack' and 'getFileList' are not fileManager aware and do not continue to work. They are the only functions I found which try to access 'this.files' which seems to be replaced by the fileManager. Accessing the missing 'this.files' causes my runtime error at least.
Please double check the compatibility of these two functions with the new and fancy fileManager.
The text was updated successfully, but these errors were encountered: