Sha256: bdf5b1169cde2b818c3cb3989cd0fe4fb5ed9e1e2a6f6b70e28ba766bbb65739
Contents?: true
Size: 1.64 KB
Versions: 18
Compression:
Stored size: 1.64 KB
Contents
=begin <script type="text/javascript"> <% session_key_name = Rails.application.config.session_options[:key] %> // Default options $(function() { var uploader = new plupload.Uploader({ runtimes: 'html5,flash', //url: '<%= photos_path %>', //container : 'container', browse_button : 'applicious_uploader', max_file_size : '10mb', flash_swf_url : '<%= asset_path("plupload.flash.swf") %>', multipart: true, multipart_params: { '_http_accept': 'application/javascript', 'authenticity_token' : '<%= form_authenticity_token %>', '<%= session_key_name %>' : encodeURIComponent('<%= u cookies[session_key_name] %>') }, filters : [ //{title : "Zip files", extensions : "zip"}, {title : "Image files", extensions : "jpeg,jpg,gif,png"}, ], //resize : {width : 320, height : 240, quality : 90}, filters : [ {title : "Image files", extensions : "jpg,gif,png"}, {title : "Zip files", extensions : "zip"} ], }); uploader.bind('FilesAdded', function(up, files) { $.each(files, function(i, file) { $('#filelist').append( '<div id="' + file.id + '">' + file.name + ' (' + plupload.formatSize(file.size) + ') <b></b>' + '</div>'); }); up.refresh(); // Reposition Flash/Silverlight }); uploader.bind('UploadProgress', function(up, file) { AP.log( up, file ); }); uploader.bind('Error', function(up, err) { AP.log( up, err ); up.refresh(); // Reposition Flash/Silverlight }); uploader.bind('FileUploaded', function(up, file) { AP.log( up, file ); }); uploader.init(); $('#uploadfiles').click(function(e) { uploader.start(); e.preventDefault(); }); }); </script> =end
Version data entries
18 entries across 18 versions & 1 rubygems