Uncaught TypeError: Cannot read property 'options' of undefined

4,805 views
Skip to first unread message

Darin Gilchrist

unread,
Mar 6, 2013, 8:15:39 PM3/6/13
to jquery-f...@googlegroups.com
Let me start off by saying that I love the blueimp jQuery File Upload utility, and am excited about the jQuery UI branch!

I am getting the following error message when trying to upload through Chrome, and similar errors in other browsers:

Uncaught TypeError: Cannot read property 'options' of undefined

Seems to be line 87 of the "jquery.fileupload-ui.js" file, which reads:

var that = $(this).data('fileupload'),
options = that.options,
files = data.files;

This happens in the latest download package, after selecting a file and attempting to initiate the upload.

The demo code in the download package has the same issue, so I believe it's not just me seeing this. How can I fix this? Known issue?

Thanks for your help!

tomwal...@gmail.com

unread,
Jun 27, 2013, 8:49:59 AM6/27/13
to jquery-f...@googlegroups.com
Yes I have exactly the same problem.  The basic & basic-plus ones work but not the ui or angular.

Also the links to the JS files are incorrect.  load-image.min.js, canvas-to-blob.min.js & bootstrap.min.js  Corrected by download from the online working demo.

Alex Griggs

unread,
Jun 27, 2013, 12:51:36 PM6/27/13
to jquery-f...@googlegroups.com
I have update the links on my site, but for some reason it will not show the list of files?

any ideas?
Message has been deleted

Clarice Billowes

unread,
Nov 21, 2013, 5:10:05 AM11/21/13
to jquery-f...@googlegroups.com
This problem cost me a lot of time and energy. It seems to be a jQuery version problem. The plugin I downloaded referenced 1.7.1. and I was using 1.10.2. I found that changing $(this).data('fileupload') to $(this).data('blueimpUI-fileupload') worked for me.

I found that out by reading a comment from " aburakab" here (and pasted below): https://github.com/blueimp/jQuery-File-Upload/issues/2084. I hope this helps!

I tried $(this).data('blueimpUI-fileupload') ... scripts taken from MVC 3 Sample

https://github.com/maxpavlov/jQuery-File-Upload.MVC3

and it works with me.

Paresh Sarkar

unread,
Sep 4, 2017, 2:42:56 AM9/4/17
to jQuery-File-Upload

Uncaught TypeError: Cannot read property 'options' of undefined
Seems to be line 87 of the "jquery.fileupload-ui.js" file, which reads:
var that = $(this).data('fileupload'),
options = that.options,
files = data.files;

Yes I faced same problem and it  is due to version changed ... 1.7.1 to 1.11.0
This is resolved by replacing  $(this).data('fileupload') to $(this).data('blueimpUI-fileupload') everywhere at jquery.fileupload-ui.js file..
Thanks


Reply all
Reply to author
Forward
0 new messages