chunked - Malsup jQuery form upload in chunks -
i use malsup jquery form upload. works php. http://malsup.com/jquery/form/
is there nice way add chunked uploads using malsup? suggestions?
var xhr = new xmlhttprequest();
var percent = $('.percent'); var bar = $('.bar'); /* submit form ajax request */ $('form').ajaxform({ datatype: 'json', beforesend: function() { bar.width('0%'); percent.html('0%'); }, uploadprogress: function(event, position, total, percentcomplete) { var pvel = percentcomplete + '%'; bar.width(pvel); percent.html(pvel); }, success: function(xhr) { var percentval = '100%'; bar.width(percentval) percent.html(percentval); }, complete: function(xhr) { var url = window.location.origin = window.location.protocol+"//"+window.location.host+"/thank-you/"; window.location.replace(url); } });
edit: has else experienced upload bar indicator not working on mobile chrome (at least it's not working on chrome ios , have tested default examples well)?
kind regards johan
Comments
Post a Comment