I use the plugin to load the blueimp file in the project and run into some difficulties with IE8, mainly that nothing happens!
My setup is as close as possible to the plugin daemon settings - the files are included in the same order, the html structure changes very slightly, css is identical, etc.
In other browsers + ie9, everything works as expected, but in ie8 it is as if the button for adding an image is not attached to it.
If I upload to ie9, then switch the document type to ie8 using the dev tools, the image will be restored from the server successfully.
Itβs hard for me to show the full code, because the document, unfortunately, is rather confusing, but the page is here: http://www.yoursplash.co.uk/index.php?route=product/product&product_id=108
and this is almost everything related to file upload:
these are the files that I include in this order to make the plugin work
<script src="http://blueimp.github.com/JavaScript-Templates/tmpl.min.js"></script> <script src="http://blueimp.github.com/JavaScript-Load-Image/load-image.min.js"></script> <script src="http://blueimp.github.com/JavaScript-Canvas-to-Blob/canvas-to-blob.min.js"></script> <script src="catalog/view/javascript/jquery/blueimp/jquery.iframe-transport.js"></script> <script src="catalog/view/javascript/jquery/blueimp/jquery.fileupload.js"></script> <script src="catalog/view/javascript/jquery/blueimp/jquery.fileupload-fp.js"></script> <script src="catalog/view/javascript/jquery/blueimp/jquery.fileupload-ui.js"></script> <script src="catalog/view/javascript/jquery/blueimp/jquery.fileupload-jui.js"></script>
This is my own implementation of the plugin.
'use strict'; $(document).on('ready', function () { $.ajax({ url: '/index.php?route=product/userimage&usetype=get', dataType: 'json', context: $('#fileupload')[0] }).done(function (result) { $(this).fileupload('option', 'done').call(this, null, {result: result}); if ($('#filesContainer > .template-download').length > 0) { $('a[href="#user-upload"]').removeClass('selected').siblings('a[href="#user-photos"]').addClass('selected'); $('#user-upload').hide().siblings('#user-photos').fadeIn(); }; }); }); $('#fileupload').fileupload( { url: '/index.php?route=product/userimage&usetype=put', type: 'POST', maxFileSize: 5000000, fileInput : '#imgUp', acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i, process: [ { action: 'load', fileTypes: /^image\/(gif|jpeg|png)$/, maxFileSize: 5000000
this is the HTML of my plugin implementation
<form id="fileupload" action="//jquery-file-upload.appspot.com/" method="POST" enctype="multipart/form-data"> <noscript><input type="hidden" name="redirect" value="http://blueimp.github.com/jQuery-File-Upload/"></noscript> <div class="row fileupload-buttonbar"> <div class="span7" style="height:30px;"> <p style="float:left;display:block;width:480px;margin-right:10px;padding:5px;">Select images from your computer and once uploaded you may use them in your design</p> <span class="btn btn-success fileinput-button"> <i class="icon-plus icon-white"></i> <span>Add images..</span> <input type="file" name="files[]" id="imgUp" multipart> </span> </div> <div class="span5 fileupload-progress fade"> <div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100"> <div class="bar" style="width:0%;"></div> </div> <div class="progress-extended"> </div> </div> </div> <div class="fileupload-loading"></div> </form>
Any help would be welcomed - I'm close to tearing my hair out with this, because there seems to be no good reason for it not working!