* fixed Issue 78: Fix plupload for Chrome

git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk/redmine_dmsf@142 5e329b0b-a2ee-ea63-e329-299493fc886d
This commit is contained in:
vit.jonas@gmail.com 2011-06-09 07:33:00 +00:00
parent 804c175c20
commit b79626a488
2 changed files with 6 additions and 1 deletions

View File

@ -81,7 +81,7 @@
uploader.html("<div></div>");
uploader = jQuery("div",uploader);
uploader.plupload({
runtimes : 'gears,html5,flash,html4',
runtimes : 'html5,flash,html4',
url : '<%= url_for({:controller => "dmsf_upload", :action => "upload_file", :id => @project, :folder_id => @folder}) %>',
max_file_size : "100mb",
max_file_count: '<%= Setting.plugin_redmine_dmsf["dmsf_max_file_upload"].to_i if Setting.plugin_redmine_dmsf["dmsf_max_file_upload"].to_i > 0 %>',

View File

@ -13,6 +13,11 @@
(function(window, document, plupload, undef) {
var fakeSafariDragDrop;
if ((typeof File !== 'undefined') && !File.prototype.slice) {
if (File.prototype.webkitSlice) File.prototype.slice = File.prototype.webkitSlice;
if (File.prototype.mozSlice) File.prototype.slice = File.prototype.mozSlice;
}
/* Introduce sendAsBinary for latest WebKits having support for BlobBuilder and typed arrays:
credits: http://javascript0.org/wiki/Portable_sendAsBinary,