473,321 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

blueimp jQuery upload plugin unresponsive in production

228 100+
I have implemented blueimp jQuery upload with CodeIgniter three. It works great in my development server but not in production. I have used the default script.js provided. During upload, the file uploaded shows 100 with tick (to be it is uploaded at least to temporary folder or something) but it never goes anywhere. After upload is completed, it redirects but here, the done event doesn't get fired at all.

I confirmed that my form is never submitted (Controller never been called) and I see no error in the upload JS script. But here is the result of console.log and alerts I get from each method:

Expand|Select|Wrap|Line Numbers
  1. add: function (e, data) {
  2.  
  3.         //this seems to work fin
  4.  
  5.  
  6.         var tpl = $('<li class="working"><input type="text" value="0" data-width="48" data-height="48"'+
  7.             ' data-fgColor="#0788a5" data-readOnly="1" data-bgColor="#3e4043" /><p></p><span></span></li>');
  8.  
  9.         // Append the file name and file size
  10.         tpl.find('p').text(data.files[0].name)
  11.                      .append('<i>' + formatFileSize(data.files[0].size) + '</i>');
  12.  
  13.         // Add the HTML to the UL element
  14.         data.context = tpl.appendTo(ul);
  15.  
  16.         // Initialize the knob plugin
  17.         tpl.find('input').knob();
  18.  
  19.         // Listen for clicks on the cancel icon
  20.         tpl.find('span').click(function(){
  21.  
  22.             if(tpl.hasClass('working')){
  23.                 jqXHR.abort();
  24.             }
  25.  
  26.             tpl.fadeOut(function(){
  27.                 tpl.remove();
  28.             });
  29.  
  30.         });
  31.  
  32.         // Automatically upload the file once it is added to the queue
  33.          console.log("submitting selected images");
  34.             //behaving as expected
  35.      var jqXHR = data.submit();
  36.  
  37.  
  38.     },
  39.  
  40.  
  41. done: function (e, data) {
  42.         console.log("done event reached");
  43.     //not entering this event AT ALL
  44.       //REDIRECT
  45.  
  46. },
  47.     progress: function(e, data){
  48.       //This one logs progress as 100, 95,3 etc for one file. I assume that is also expected behaviour tho I found it odd it starts with 100 and goes down. I am uploading only one file to try.
  49.  
  50.         var progress = parseInt(data.loaded / data.total * 100, 10);
  51.  
  52.  
  53.         data.context.find('input').val(progress).change();
  54.  
  55.         if(progress == 100){
  56.             data.context.removeClass('working');
  57.  
  58.  
  59.         }
  60.        console.log("progress");
  61.     },
  62.  
  63.     fail:function(e, data){
  64.         // This is logged if I refresh the page only (to try again).
  65.           console.log(data.context);
  66.           console.log('fail event fired');
  67.         data.context.addClass('uploadError');
  68.     },
  69.     success:function(e, data){
  70.         //file uploaded awesome
  71.         //this event never reached.
  72.  
  73.     },
  74.     always:function(e, data){
  75.         //file uploaded awesome
  76.         //this fires only if I hit the refresh button to reload the page again
  77.         alert(data);
  78.     }
Any clue where it is failing and why so much difference when the server and development envrions are identical? I have confirmed my filesystem rights on the server too.
Mar 3 '16 #1
0 1371

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Mike | last post by:
I have a page with the following code (just the essentials...) Anyway, the style sheet loads and formats perfectly locally on all my test browsers (IE 6, NS 7.1, K-Meleon, Phoenix/Mozilla, Opera),...
10
Fary4u
by: Fary4u | last post by:
I've recently find some Paginate Plugin but it's only came with NEXT & PRV HERE IS THE CODE eval(function(p,a,c,k,e,r){e=function(c) {...
0
by: amskape | last post by:
hi Friends, I need to Upload some files in a Listing , by clicking corresponding Upload link, then a popup window will come with Browse option as Shown in attachment File. My actual need is...
3
by: Eni Shima | last post by:
Hello. I want to create an comonent like adobe gradient picker in javascript and jquery. I want to use the jquery gradients plugin. there is a div with 2 markers left and right. when i clicked in...
0
by: BaseballGraphs | last post by:
Hello, I am making use of jQuery's .autocomplete plugin, and I would appreciate some assistance formating the results that show up in the dropdown menu that populates when text is written into the...
5
by: balu k | last post by:
hi..., iam using jquery multiselect plugin in my application when the page is loading not properly the pluging is laoded correctly but page loads properly plugin not laoded propelry i dnt know what...
0
by: celinsmith111 | last post by:
jQuery has always offered you a plethora of options for performing tweaks to your website and/or web applications. One such flexibility that's available with jQuery is the ease of bending the rules...
0
by: rento | last post by:
I need help with tooltipster plugin i do not see need result :( The next script work, but error do not with tooltipster. <script...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.