plupload 1.5.4
This commit is contained in:
parent
0ed49f3021
commit
bd431ab2e3
|
@ -1,3 +1,49 @@
|
||||||
|
Version 1.5.4 (2012-04-12)
|
||||||
|
Flash: Disable scripting if swf was loaded from another domain.
|
||||||
|
Version 1.5.3 (2012-04-05)
|
||||||
|
HTML5: Check if xhr object is initialized, before calling abort() on it.
|
||||||
|
HTML4: Postpone form removal until uploaders state changes, to avoid error on resuming stopped uploads.
|
||||||
|
BrowserPlus: Fix mechanical typo, that caused error during mime type check.
|
||||||
|
BrowserPlus: browserPlus.Uploader.Cancel() has two required parameters, dies with the error if not passed.
|
||||||
|
Flash: Improve runtime's behaviour during upload cancellation.
|
||||||
|
Flash: Survive the case when GPSVersionID contains unexpected value.
|
||||||
|
Flash: Fix random freeze in Chrome's bundled Flash Player.
|
||||||
|
Flash: Avoid the silent break when URLStream not yet open, but close is called on it.
|
||||||
|
Flash: Move Destroy handler out of Flash:Init handler, since it might be called not only after Flash:Init but also before it.
|
||||||
|
Flash: Avoid warning during build with mxmlc.
|
||||||
|
Try removeEventListener first in IE and only if it fails - detachEvent.
|
||||||
|
Fix plupload.getPos to return proper value in IE8+.
|
||||||
|
Do not initiate plupload.STARTED state, if file queue is empty.
|
||||||
|
Additional language packs: Estonian, Polish, Korean, French-Canadian, Greek, Persian/Farsi.
|
||||||
|
Version 1.5.2 (2012-01-06)
|
||||||
|
UI Widget: Do not show UI if no runtime can be initialized.
|
||||||
|
UI Widget: Timely update file size and total size if resize in action.
|
||||||
|
UI Widget: Constrain renaming feature to queued files only.
|
||||||
|
UI Widget: Disable Add button properly, if requested, rather then just hide.
|
||||||
|
HTML4/HTML5/BrowserPlus: Avoid adding mime type twice to dialog trigger.
|
||||||
|
HTML5: fix regression, when unresized images were failing on FF3.6.
|
||||||
|
HTML5: Constrain Gecko 2,5,6 workaround to multipart mode only.
|
||||||
|
HTML5/Flash: Take into account weird possibilities of ExifVersion being a string, rather then standard Undefined.
|
||||||
|
Flash: Simplify event dispatching in BitmapDataUnlimited class, in order to avoid freezing on resizing in FP11.
|
||||||
|
Add ability to disable file dialog trigger on request (uploader.disableBrowse(true/false)).
|
||||||
|
Support for immediate abort of upload process, be it chunked upload or regular one.
|
||||||
|
Abort all activity, before destroying uploader.
|
||||||
|
Revive temporary file removal logic in upload.php.
|
||||||
|
Fix potential vulnerability in dump.php and upload.php.
|
||||||
|
Additional MIME types: application/vnd.openxmlformats-officedocument.*, application/x-javascript, application/json, text/css,css, application/vnd.oasis.opendocument.formula-templat.
|
||||||
|
Additional language packs: Hungarian, Croatian, Serbian, Romanian.
|
||||||
|
Version 1.5.1.1 (2011-09-27)
|
||||||
|
HTML5: Fix mechanical typo, that successfully broke drag and drop, wherever could.
|
||||||
|
Version 1.5.1 (2011-09-26)
|
||||||
|
HTML4: Add support for server responses in HTML format.
|
||||||
|
HTML5: Disable multiple file selection in Safari 5.x for Windows (see #363).
|
||||||
|
HTML5: Gecko 2/5/6 should upload chunks as binary strings when in chunking mode and client side resize is requested.
|
||||||
|
Flash: Enforce URLStream mode when custom headers are passed.
|
||||||
|
Flash: Fix embedding problems in IE9 (and all other IEs).
|
||||||
|
Flash/Gears/BrowserPlus/SilverLight: Expose multi_selection feature, to be used in required_features (mainly to overcome Safari for Windows problem).
|
||||||
|
SilverLight: Properly handle custom and null headers.
|
||||||
|
UploadComplete moved to fire after the last StateChanged event.
|
||||||
|
Additional language packs: Finnish.
|
||||||
Version 1.5b (2011-09-11)
|
Version 1.5b (2011-09-11)
|
||||||
UI Widget: Fix sortable logic.
|
UI Widget: Fix sortable logic.
|
||||||
UI Widget: Fix bug, when message was displayed simultaneously across all Plupload UI instances on the page.
|
UI Widget: Fix bug, when message was displayed simultaneously across all Plupload UI instances on the page.
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 5.6 KiB |
|
@ -1,88 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
|
||||||
|
|
||||||
<title>Plupload - Queue widget example</title>
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
font-family:Verdana, Geneva, sans-serif;
|
|
||||||
font-size:13px;
|
|
||||||
color:#333;
|
|
||||||
background:url(bg.jpg);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="http://bp.yahooapis.com/2.4.21/browserplus-min.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="../js/plupload.js"></script>
|
|
||||||
<script type="text/javascript" src="../js/plupload.gears.js"></script>
|
|
||||||
<script type="text/javascript" src="../js/plupload.silverlight.js"></script>
|
|
||||||
<script type="text/javascript" src="../js/plupload.flash.js"></script>
|
|
||||||
<script type="text/javascript" src="../js/plupload.browserplus.js"></script>
|
|
||||||
<script type="text/javascript" src="../js/plupload.html4.js"></script>
|
|
||||||
<script type="text/javascript" src="../js/plupload.html5.js"></script>
|
|
||||||
|
|
||||||
<!-- <script type="text/javascript" src="http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js"></script> -->
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>Custom example</h1>
|
|
||||||
|
|
||||||
<p>Shows you how to use the core plupload API.</p>
|
|
||||||
|
|
||||||
<div id="container">
|
|
||||||
<div id="filelist">No runtime found.</div>
|
|
||||||
<br />
|
|
||||||
<a id="pickfiles" href="javascript:;">[Select files]</a>
|
|
||||||
<a id="uploadfiles" href="javascript:;">[Upload files]</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
// Custom example logic
|
|
||||||
function $(id) {
|
|
||||||
return document.getElementById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
var uploader = new plupload.Uploader({
|
|
||||||
runtimes : 'gears,html5,flash,silverlight,browserplus',
|
|
||||||
browse_button : 'pickfiles',
|
|
||||||
container: 'container',
|
|
||||||
max_file_size : '10mb',
|
|
||||||
url : 'upload.php',
|
|
||||||
resize : {width : 320, height : 240, quality : 90},
|
|
||||||
flash_swf_url : '../js/plupload.flash.swf',
|
|
||||||
silverlight_xap_url : '../js/plupload.silverlight.xap',
|
|
||||||
filters : [
|
|
||||||
{title : "Image files", extensions : "jpg,gif,png"},
|
|
||||||
{title : "Zip files", extensions : "zip"}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
|
|
||||||
uploader.bind('Init', function(up, params) {
|
|
||||||
$('filelist').innerHTML = "<div>Current runtime: " + params.runtime + "</div>";
|
|
||||||
});
|
|
||||||
|
|
||||||
uploader.bind('FilesAdded', function(up, files) {
|
|
||||||
for (var i in files) {
|
|
||||||
$('filelist').innerHTML += '<div id="' + files[i].id + '">' + files[i].name + ' (' + plupload.formatSize(files[i].size) + ') <b></b></div>';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
uploader.bind('UploadProgress', function(up, file) {
|
|
||||||
$(file.id).getElementsByTagName('b')[0].innerHTML = '<span>' + file.percent + "%</span>";
|
|
||||||
});
|
|
||||||
|
|
||||||
$('uploadfiles').onclick = function() {
|
|
||||||
uploader.start();
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
uploader.init();
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,36 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
|
||||||
<link rel="stylesheet" href="css/plupload.css" type="text/css" media="screen" />
|
|
||||||
<title>Plupload - Form dump</title>
|
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
font-family:Verdana, Geneva, sans-serif;
|
|
||||||
font-size:13px;
|
|
||||||
color:#333;
|
|
||||||
background:url(bg.jpg);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>Post dump</h1>
|
|
||||||
|
|
||||||
<p>Shows the form items posted.</p>
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Value</th>
|
|
||||||
</tr>
|
|
||||||
<?php $count = 0; foreach ($_POST as $name => $value) { ?>
|
|
||||||
<tr class="<?php echo $count % 2 == 0 ? 'alt' : ''; ?>">
|
|
||||||
<td><?php echo $name ?></td>
|
|
||||||
<td><?php echo nl2br(htmlentities(stripslashes($value))) ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php } ?>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,196 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
|
||||||
<link rel="stylesheet" href="../../js/jquery.plupload.queue/css/jquery.plupload.queue.css" type="text/css" media="screen" />
|
|
||||||
<title>Plupload - Events example</title>
|
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
font-family:Verdana, Geneva, sans-serif;
|
|
||||||
font-size:13px;
|
|
||||||
color:#333;
|
|
||||||
background:url(../bg.jpg);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
|
|
||||||
<script type="text/javascript" src="http://bp.yahooapis.com/2.4.21/browserplus-min.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="../../js/plupload.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.gears.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.silverlight.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.flash.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.browserplus.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.html4.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.html5.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/jquery.plupload.queue/jquery.plupload.queue.js"></script>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<form method="post" action="dump.php">
|
|
||||||
<h1>Events example</h1>
|
|
||||||
|
|
||||||
<p>Shows how to bind and use all available events.</p>
|
|
||||||
|
|
||||||
<h3>Log messages</h3>
|
|
||||||
<textarea id="log" style="width: 100%; height: 150px; font-size: 11px" spellcheck="false" wrap="off"></textarea>
|
|
||||||
|
|
||||||
<h3>Queue widget</h3>
|
|
||||||
<div id="uploader" style="width: 450px; height: 330px;">You browser doesn't support upload.</div>
|
|
||||||
<a id="clear" href="#">Clear queue</a>
|
|
||||||
</form>
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(function() {
|
|
||||||
function log() {
|
|
||||||
var str = "";
|
|
||||||
|
|
||||||
plupload.each(arguments, function(arg) {
|
|
||||||
var row = "";
|
|
||||||
|
|
||||||
if (typeof(arg) != "string") {
|
|
||||||
plupload.each(arg, function(value, key) {
|
|
||||||
// Convert items in File objects to human readable form
|
|
||||||
if (arg instanceof plupload.File) {
|
|
||||||
// Convert status to human readable
|
|
||||||
switch (value) {
|
|
||||||
case plupload.QUEUED:
|
|
||||||
value = 'QUEUED';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case plupload.UPLOADING:
|
|
||||||
value = 'UPLOADING';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case plupload.FAILED:
|
|
||||||
value = 'FAILED';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case plupload.DONE:
|
|
||||||
value = 'DONE';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof(value) != "function") {
|
|
||||||
row += (row ? ', ': '') + key + '=' + value;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
str += row + " ";
|
|
||||||
} else {
|
|
||||||
str += arg + " ";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#log').val($('#log').val() + str + "\r\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#uploader").pluploadQueue({
|
|
||||||
// General settings
|
|
||||||
runtimes: 'html5,gears,browserplus,silverlight,flash,html4',
|
|
||||||
url: '../upload.php',
|
|
||||||
max_file_size: '10mb',
|
|
||||||
chunk_size: '1mb',
|
|
||||||
unique_names: true,
|
|
||||||
|
|
||||||
// Resize images on clientside if we can
|
|
||||||
resize: {width: 320, height: 240, quality: 90},
|
|
||||||
|
|
||||||
// Specify what files to browse for
|
|
||||||
filters: [
|
|
||||||
{title: "Image files", extensions: "jpg,gif,png"},
|
|
||||||
{title: "Zip files", extensions: "zip"}
|
|
||||||
],
|
|
||||||
|
|
||||||
// Flash/Silverlight paths
|
|
||||||
flash_swf_url: '../../js/plupload.flash.swf',
|
|
||||||
silverlight_xap_url: '../../js/plupload.silverlight.xap',
|
|
||||||
|
|
||||||
// PreInit events, bound before any internal events
|
|
||||||
preinit: {
|
|
||||||
Init: function(up, info) {
|
|
||||||
log('[Init]', 'Info:', info, 'Features:', up.features);
|
|
||||||
},
|
|
||||||
|
|
||||||
UploadFile: function(up, file) {
|
|
||||||
log('[UploadFile]', file);
|
|
||||||
|
|
||||||
// You can override settings before the file is uploaded
|
|
||||||
// up.settings.url = 'upload.php?id=' + file.id;
|
|
||||||
// up.settings.multipart_params = {param1: 'value1', param2: 'value2'};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Post init events, bound after the internal events
|
|
||||||
init: {
|
|
||||||
Refresh: function(up) {
|
|
||||||
// Called when upload shim is moved
|
|
||||||
log('[Refresh]');
|
|
||||||
},
|
|
||||||
|
|
||||||
StateChanged: function(up) {
|
|
||||||
// Called when the state of the queue is changed
|
|
||||||
log('[StateChanged]', up.state == plupload.STARTED ? "STARTED": "STOPPED");
|
|
||||||
},
|
|
||||||
|
|
||||||
QueueChanged: function(up) {
|
|
||||||
// Called when the files in queue are changed by adding/removing files
|
|
||||||
log('[QueueChanged]');
|
|
||||||
},
|
|
||||||
|
|
||||||
UploadProgress: function(up, file) {
|
|
||||||
// Called while a file is being uploaded
|
|
||||||
log('[UploadProgress]', 'File:', file, "Total:", up.total);
|
|
||||||
},
|
|
||||||
|
|
||||||
FilesAdded: function(up, files) {
|
|
||||||
// Callced when files are added to queue
|
|
||||||
log('[FilesAdded]');
|
|
||||||
|
|
||||||
plupload.each(files, function(file) {
|
|
||||||
log(' File:', file);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
FilesRemoved: function(up, files) {
|
|
||||||
// Called when files where removed from queue
|
|
||||||
log('[FilesRemoved]');
|
|
||||||
|
|
||||||
plupload.each(files, function(file) {
|
|
||||||
log(' File:', file);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
FileUploaded: function(up, file, info) {
|
|
||||||
// Called when a file has finished uploading
|
|
||||||
log('[FileUploaded] File:', file, "Info:", info);
|
|
||||||
},
|
|
||||||
|
|
||||||
ChunkUploaded: function(up, file, info) {
|
|
||||||
// Called when a file chunk has finished uploading
|
|
||||||
log('[ChunkUploaded] File:', file, "Info:", info);
|
|
||||||
},
|
|
||||||
|
|
||||||
Error: function(up, args) {
|
|
||||||
// Called when a error has occured
|
|
||||||
|
|
||||||
// Handle file specific error and general error
|
|
||||||
if (args.file) {
|
|
||||||
log('[error]', args, "File:", args.file);
|
|
||||||
} else {
|
|
||||||
log('[error]', args);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#log').val('');
|
|
||||||
$('#clear').click(function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
$("#uploader").pluploadQueue().splice();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,102 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
|
||||||
<title>Plupload - Queue widget example</title>
|
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
font-family:Verdana, Geneva, sans-serif;
|
|
||||||
font-size:13px;
|
|
||||||
color:#333;
|
|
||||||
background:url(../bg.jpg);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/base/jquery-ui.css" type="text/css" />
|
|
||||||
<link rel="stylesheet" href="../../js/jquery.ui.plupload/css/jquery.ui.plupload.css" type="text/css" />
|
|
||||||
|
|
||||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
|
|
||||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
|
|
||||||
<script type="text/javascript" src="http://bp.yahooapis.com/2.4.21/browserplus-min.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="../../js/plupload.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.gears.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.silverlight.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.flash.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.browserplus.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.html4.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.html5.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/jquery.ui.plupload/jquery.ui.plupload.js"></script>
|
|
||||||
|
|
||||||
<!--<script type="text/javascript" src="http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js"></script>-->
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>jQuery UI Widget</h1>
|
|
||||||
|
|
||||||
<p>You can see this example with different themes on the <a href="http://plupload.com/example_jquery_ui.php">www.plupload.com</a> website.</p>
|
|
||||||
|
|
||||||
<form method="post" action="dump.php">
|
|
||||||
<div id="uploader">
|
|
||||||
<p>You browser doesn't have Flash, Silverlight, Gears, BrowserPlus or HTML5 support.</p>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<script type="text/javascript">
|
|
||||||
// Convert divs to queue widgets when the DOM is ready
|
|
||||||
$(function() {
|
|
||||||
$("#uploader").plupload({
|
|
||||||
// General settings
|
|
||||||
runtimes : 'flash,html5,browserplus,silverlight,gears,html4',
|
|
||||||
url : '../upload.php',
|
|
||||||
max_file_size : '1000mb',
|
|
||||||
max_file_count: 20, // user can add no more then 20 files at a time
|
|
||||||
chunk_size : '1mb',
|
|
||||||
unique_names : true,
|
|
||||||
multiple_queues : true,
|
|
||||||
|
|
||||||
// Resize images on clientside if we can
|
|
||||||
resize : {width : 320, height : 240, quality : 90},
|
|
||||||
|
|
||||||
// Rename files by clicking on their titles
|
|
||||||
rename: true,
|
|
||||||
|
|
||||||
// Sort files
|
|
||||||
sortable: true,
|
|
||||||
|
|
||||||
// Specify what files to browse for
|
|
||||||
filters : [
|
|
||||||
{title : "Image files", extensions : "jpg,gif,png"},
|
|
||||||
{title : "Zip files", extensions : "zip,avi"}
|
|
||||||
],
|
|
||||||
|
|
||||||
// Flash settings
|
|
||||||
flash_swf_url : '../../js/plupload.flash.swf',
|
|
||||||
|
|
||||||
// Silverlight settings
|
|
||||||
silverlight_xap_url : '../../js/plupload.silverlight.xap'
|
|
||||||
});
|
|
||||||
|
|
||||||
// Client side form validation
|
|
||||||
$('form').submit(function(e) {
|
|
||||||
var uploader = $('#uploader').plupload('getUploader');
|
|
||||||
|
|
||||||
// Files in queue upload them first
|
|
||||||
if (uploader.files.length > 0) {
|
|
||||||
// When all files are uploaded submit form
|
|
||||||
uploader.bind('StateChanged', function() {
|
|
||||||
if (uploader.files.length === (uploader.total.uploaded + uploader.total.failed)) {
|
|
||||||
$('form')[0].submit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
uploader.start();
|
|
||||||
} else
|
|
||||||
alert('You must at least upload one file.');
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,174 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
|
||||||
<title>Plupload - Queue widget example</title>
|
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
font-family:Verdana, Geneva, sans-serif;
|
|
||||||
font-size:13px;
|
|
||||||
color:#333;
|
|
||||||
background:url(../bg.jpg);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link rel="stylesheet" href="../../js/jquery.plupload.queue/css/jquery.plupload.queue.css" type="text/css" media="screen" />
|
|
||||||
|
|
||||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
|
|
||||||
<script type="text/javascript" src="http://bp.yahooapis.com/2.4.21/browserplus-min.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="../../js/plupload.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.gears.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.silverlight.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.flash.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.browserplus.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.html4.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.html5.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/jquery.plupload.queue/jquery.plupload.queue.js"></script>
|
|
||||||
|
|
||||||
<!-- <script type="text/javascript" src="http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js"></script> -->
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<form method="post" action="dump.php">
|
|
||||||
<h1>Queue widget example</h1>
|
|
||||||
|
|
||||||
<p>Shows the jQuery Plupload Queue widget and under different runtimes.</p>
|
|
||||||
|
|
||||||
<div style="float: left; margin-right: 20px">
|
|
||||||
<h3>Flash runtime</h3>
|
|
||||||
<div id="flash_uploader" style="width: 450px; height: 330px;">You browser doesn't have Flash installed.</div>
|
|
||||||
|
|
||||||
<h3>Gears runtime</h3>
|
|
||||||
<div id="gears_uploader" style="width: 450px; height: 330px;">You browser doesn't have Gears installed.</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="float: left; margin-right: 20px">
|
|
||||||
<h3>Silverlight runtime</h3>
|
|
||||||
<div id="silverlight_uploader" style="width: 450px; height: 330px;">You browser doesn't have Silverlight installed.</div>
|
|
||||||
|
|
||||||
<h3>HTML 5 runtime</h3>
|
|
||||||
<div id="html5_uploader" style="width: 450px; height: 330px;">You browser doesn't support native upload. Try Firefox 3 or Safari 4.</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="float: left; margin-right: 20px">
|
|
||||||
<h3>BrowserPlus runtime</h3>
|
|
||||||
<div id="browserplus_uploader" style="width: 450px; height: 330px;">You browser doesn't have BrowserPlus installed.</div>
|
|
||||||
|
|
||||||
<h3>HTML 4 runtime</h3>
|
|
||||||
<div id="html4_uploader" style="width: 450px; height: 330px;">You browser doesn't have HTML 4 support.</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br style="clear: both" />
|
|
||||||
|
|
||||||
<input type="submit" value="Send" />
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(function() {
|
|
||||||
// Setup flash version
|
|
||||||
$("#flash_uploader").pluploadQueue({
|
|
||||||
// General settings
|
|
||||||
runtimes : 'flash',
|
|
||||||
url : '../upload.php',
|
|
||||||
max_file_size : '10mb',
|
|
||||||
chunk_size : '1mb',
|
|
||||||
unique_names : true,
|
|
||||||
filters : [
|
|
||||||
{title : "Image files", extensions : "jpg,gif,png"},
|
|
||||||
{title : "Zip files", extensions : "zip"}
|
|
||||||
],
|
|
||||||
|
|
||||||
// Resize images on clientside if we can
|
|
||||||
resize : {width : 320, height : 240, quality : 90},
|
|
||||||
|
|
||||||
// Flash settings
|
|
||||||
flash_swf_url : '../../js/plupload.flash.swf'
|
|
||||||
});
|
|
||||||
|
|
||||||
// Setup gears version
|
|
||||||
$("#gears_uploader").pluploadQueue({
|
|
||||||
// General settings
|
|
||||||
runtimes : 'gears',
|
|
||||||
url : 'upload.php',
|
|
||||||
max_file_size : '10mb',
|
|
||||||
chunk_size : '1mb',
|
|
||||||
unique_names : true,
|
|
||||||
filters : [
|
|
||||||
{title : "Image files", extensions : "jpg,gif,png"},
|
|
||||||
{title : "Zip files", extensions : "zip"}
|
|
||||||
],
|
|
||||||
|
|
||||||
// Resize images on clientside if we can
|
|
||||||
resize : {width : 320, height : 240, quality : 90}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Setup silverlight version
|
|
||||||
$("#silverlight_uploader").pluploadQueue({
|
|
||||||
// General settings
|
|
||||||
runtimes : 'silverlight',
|
|
||||||
url : 'upload.php',
|
|
||||||
max_file_size : '10mb',
|
|
||||||
chunk_size : '1mb',
|
|
||||||
unique_names : true,
|
|
||||||
filters : [
|
|
||||||
{title : "Image files", extensions : "jpg,gif,png"},
|
|
||||||
{title : "Zip files", extensions : "zip"}
|
|
||||||
],
|
|
||||||
|
|
||||||
// Resize images on clientside if we can
|
|
||||||
resize : {width : 320, height : 240, quality : 90},
|
|
||||||
|
|
||||||
// Silverlight settings
|
|
||||||
silverlight_xap_url : '../../js/plupload.silverlight.xap'
|
|
||||||
});
|
|
||||||
|
|
||||||
// Setup html5 version
|
|
||||||
$("#html5_uploader").pluploadQueue({
|
|
||||||
// General settings
|
|
||||||
runtimes : 'html5',
|
|
||||||
url : 'upload.php',
|
|
||||||
max_file_size : '10mb',
|
|
||||||
chunk_size : '1mb',
|
|
||||||
unique_names : true,
|
|
||||||
filters : [
|
|
||||||
{title : "Image files", extensions : "jpg,gif,png"},
|
|
||||||
{title : "Zip files", extensions : "zip"}
|
|
||||||
],
|
|
||||||
|
|
||||||
// Resize images on clientside if we can
|
|
||||||
resize : {width : 320, height : 240, quality : 90}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Setup browserplus version
|
|
||||||
$("#browserplus_uploader").pluploadQueue({
|
|
||||||
// General settings
|
|
||||||
runtimes : 'browserplus',
|
|
||||||
url : 'upload.php',
|
|
||||||
max_file_size : '10mb',
|
|
||||||
chunk_size : '1mb',
|
|
||||||
unique_names : true,
|
|
||||||
filters : [
|
|
||||||
{title : "Image files", extensions : "jpg,gif,png"},
|
|
||||||
{title : "Zip files", extensions : "zip"}
|
|
||||||
],
|
|
||||||
|
|
||||||
// Resize images on clientside if we can
|
|
||||||
resize : {width : 320, height : 240, quality : 90}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Setup html4 version
|
|
||||||
$("#html4_uploader").pluploadQueue({
|
|
||||||
// General settings
|
|
||||||
runtimes : 'html4',
|
|
||||||
url : 'upload.php',
|
|
||||||
unique_names : true,
|
|
||||||
filters : [
|
|
||||||
{title : "Image files", extensions : "jpg,gif,png"},
|
|
||||||
{title : "Zip files", extensions : "zip"}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,158 +0,0 @@
|
||||||
<?php
|
|
||||||
/*
|
|
||||||
In order to upload files to S3 using Flash runtime, one should start by placing crossdomain.xml into the bucket.
|
|
||||||
crossdomain.xml can be as simple as this:
|
|
||||||
|
|
||||||
<?xml version="1.0"?>
|
|
||||||
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
|
|
||||||
<cross-domain-policy>
|
|
||||||
<allow-access-from domain="*" secure="false" />
|
|
||||||
</cross-domain-policy>
|
|
||||||
|
|
||||||
In our tests SilverLight didn't require anything special and worked with this configuration just fine. It may fail back
|
|
||||||
to the same crossdomain.xml as last resort.
|
|
||||||
|
|
||||||
!!!Important!!! Plupload UI Widget here, is used only for demo purposes and is not required for uploading to S3.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// important variables that will be used throughout this example
|
|
||||||
$bucket = 'BUCKET';
|
|
||||||
|
|
||||||
// these can be found on your Account page, under Security Credentials > Access Keys
|
|
||||||
$accessKeyId = 'ACCESS_KEY_ID';
|
|
||||||
$secret = 'SECRET_ACCESS_KEY';
|
|
||||||
|
|
||||||
|
|
||||||
// hash_hmac — Generate a keyed hash value using the HMAC method
|
|
||||||
// (PHP 5 >= 5.1.2, PECL hash >= 1.1)
|
|
||||||
if (!function_exists('hash_hmac')) :
|
|
||||||
// based on: http://www.php.net/manual/en/function.sha1.php#39492
|
|
||||||
function hash_hmac($algo, $data, $key, $raw_output = false)
|
|
||||||
{
|
|
||||||
$blocksize = 64;
|
|
||||||
if (strlen($key) > $blocksize)
|
|
||||||
$key = pack('H*', $algo($key));
|
|
||||||
|
|
||||||
$key = str_pad($key, $blocksize, chr(0x00));
|
|
||||||
$ipad = str_repeat(chr(0x36), $blocksize);
|
|
||||||
$opad = str_repeat(chr(0x5c), $blocksize);
|
|
||||||
$hmac = pack('H*', $algo(($key^$opad) . pack('H*', $algo(($key^$ipad) . $data))));
|
|
||||||
|
|
||||||
return $raw_output ? $hmac : bin2hex($hmac);
|
|
||||||
}
|
|
||||||
endif;
|
|
||||||
|
|
||||||
// prepare policy
|
|
||||||
$policy = base64_encode(json_encode(array(
|
|
||||||
// ISO 8601 - date('c'); generates uncompatible date, so better do it manually
|
|
||||||
'expiration' => date('Y-m-d\TH:i:s.000\Z', strtotime('+1 day')),
|
|
||||||
'conditions' => array(
|
|
||||||
array('bucket' => $bucket),
|
|
||||||
array('acl' => 'public-read'),
|
|
||||||
array('starts-with', '$key', ''),
|
|
||||||
// for demo purposes we are accepting only images
|
|
||||||
array('starts-with', '$Content-Type', 'image/'),
|
|
||||||
// "Some versions of the Adobe Flash Player do not properly handle HTTP responses that have an empty body.
|
|
||||||
// To configure POST to return a response that does not have an empty body, set success_action_status to 201.
|
|
||||||
// When set, Amazon S3 returns an XML document with a 201 status code."
|
|
||||||
// http://docs.amazonwebservices.com/AmazonS3/latest/dev/HTTPPOSTFlash.html
|
|
||||||
array('success_action_status' => '201'),
|
|
||||||
// Plupload internally adds name field, so we need to mention it here
|
|
||||||
array('starts-with', '$name', ''),
|
|
||||||
// One more field to take into account: Filename - gets silently sent by FileReference.upload() in Flash
|
|
||||||
// http://docs.amazonwebservices.com/AmazonS3/latest/dev/HTTPPOSTFlash.html
|
|
||||||
array('starts-with', '$Filename', ''),
|
|
||||||
)
|
|
||||||
)));
|
|
||||||
|
|
||||||
// sign policy
|
|
||||||
$signature = base64_encode(hash_hmac('sha1', $policy, $secret, true));
|
|
||||||
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
|
||||||
<title>Plupload to Amazon S3 Example</title>
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
font-family:Verdana, Geneva, sans-serif;
|
|
||||||
font-size:13px;
|
|
||||||
color:#333;
|
|
||||||
background:url(../bg.jpg);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/base/jquery-ui.css" type="text/css" />
|
|
||||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
|
|
||||||
<script src=" https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
|
|
||||||
|
|
||||||
<!-- Load plupload and all it's runtimes and finally the UI widget -->
|
|
||||||
<link rel="stylesheet" href="../../js/jquery.ui.plupload/css/jquery.ui.plupload.css" type="text/css" />
|
|
||||||
|
|
||||||
<script type="text/javascript" src="../../js/plupload.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.gears.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.silverlight.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.flash.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.browserplus.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.html4.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/plupload.html5.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/jquery.ui.plupload/jquery.ui.plupload.js"></script>
|
|
||||||
<!--<script type="text/javascript" src="http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js"></script>-->
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>Plupload to Amazon S3 Example</h1>
|
|
||||||
|
|
||||||
<div id="uploader">
|
|
||||||
<p>You browser doesn't have Flash, Silverlight, Gears, BrowserPlus or HTML5 support.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
// Convert divs to queue widgets when the DOM is ready
|
|
||||||
$(function() {
|
|
||||||
$("#uploader").plupload({
|
|
||||||
runtimes : 'flash,silverlight',
|
|
||||||
url : 'http://<?php echo $bucket; ?>.s3.amazonaws.com/',
|
|
||||||
max_file_size : '10mb',
|
|
||||||
|
|
||||||
multipart: true,
|
|
||||||
multipart_params: {
|
|
||||||
'key': '${filename}', // use filename as a key
|
|
||||||
'Filename': '${filename}', // adding this to keep consistency across the runtimes
|
|
||||||
'acl': 'public-read',
|
|
||||||
'Content-Type': 'image/jpeg',
|
|
||||||
'success_action_status': '201',
|
|
||||||
'AWSAccessKeyId' : '<?php echo $accessKeyId; ?>',
|
|
||||||
'policy': '<?php echo $policy; ?>',
|
|
||||||
'signature': '<?php echo $signature; ?>'
|
|
||||||
},
|
|
||||||
|
|
||||||
// !!!Important!!!
|
|
||||||
// this is not recommended with S3, since it will force Flash runtime into the mode, with no progress indication
|
|
||||||
//resize : {width : 800, height : 600, quality : 60}, // Resize images on clientside, if possible
|
|
||||||
|
|
||||||
// optional, but better be specified directly
|
|
||||||
file_data_name: 'file',
|
|
||||||
|
|
||||||
// re-use widget (not related to S3, but to Plupload UI Widget)
|
|
||||||
multiple_queues: true,
|
|
||||||
|
|
||||||
// Specify what files to browse for
|
|
||||||
filters : [
|
|
||||||
{title : "JPEG files", extensions : "jpg"}
|
|
||||||
],
|
|
||||||
|
|
||||||
// Flash settings
|
|
||||||
flash_swf_url : '../../js/plupload.flash.swf',
|
|
||||||
|
|
||||||
// Silverlight settings
|
|
||||||
silverlight_xap_url : '../../js/plupload.silverlight.xap'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,124 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* upload.php
|
|
||||||
*
|
|
||||||
* Copyright 2009, Moxiecode Systems AB
|
|
||||||
* Released under GPL License.
|
|
||||||
*
|
|
||||||
* License: http://www.plupload.com/license
|
|
||||||
* Contributing: http://www.plupload.com/contributing
|
|
||||||
*/
|
|
||||||
|
|
||||||
// HTTP headers for no cache etc
|
|
||||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
|
||||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
|
||||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
|
||||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
|
||||||
header("Pragma: no-cache");
|
|
||||||
|
|
||||||
// Settings
|
|
||||||
//$targetDir = ini_get("upload_tmp_dir") . DIRECTORY_SEPARATOR . "plupload";
|
|
||||||
$targetDir = 'uploads/';
|
|
||||||
|
|
||||||
//$cleanupTargetDir = false; // Remove old files
|
|
||||||
//$maxFileAge = 60 * 60; // Temp file age in seconds
|
|
||||||
|
|
||||||
// 5 minutes execution time
|
|
||||||
@set_time_limit(5 * 60);
|
|
||||||
|
|
||||||
// Uncomment this one to fake upload time
|
|
||||||
// usleep(5000);
|
|
||||||
|
|
||||||
// Get parameters
|
|
||||||
$chunk = isset($_REQUEST["chunk"]) ? $_REQUEST["chunk"] : 0;
|
|
||||||
$chunks = isset($_REQUEST["chunks"]) ? $_REQUEST["chunks"] : 0;
|
|
||||||
$fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : '';
|
|
||||||
|
|
||||||
// Clean the fileName for security reasons
|
|
||||||
$fileName = preg_replace('/[^\w\._]+/', '', $fileName);
|
|
||||||
|
|
||||||
// Make sure the fileName is unique but only if chunking is disabled
|
|
||||||
if ($chunks < 2 && file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) {
|
|
||||||
$ext = strrpos($fileName, '.');
|
|
||||||
$fileName_a = substr($fileName, 0, $ext);
|
|
||||||
$fileName_b = substr($fileName, $ext);
|
|
||||||
|
|
||||||
$count = 1;
|
|
||||||
while (file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName_a . '_' . $count . $fileName_b))
|
|
||||||
$count++;
|
|
||||||
|
|
||||||
$fileName = $fileName_a . '_' . $count . $fileName_b;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create target dir
|
|
||||||
if (!file_exists($targetDir))
|
|
||||||
@mkdir($targetDir);
|
|
||||||
|
|
||||||
// Remove old temp files
|
|
||||||
/* this doesn't really work by now
|
|
||||||
|
|
||||||
if (is_dir($targetDir) && ($dir = opendir($targetDir))) {
|
|
||||||
while (($file = readdir($dir)) !== false) {
|
|
||||||
$filePath = $targetDir . DIRECTORY_SEPARATOR . $file;
|
|
||||||
|
|
||||||
// Remove temp files if they are older than the max age
|
|
||||||
if (preg_match('/\\.tmp$/', $file) && (filemtime($filePath) < time() - $maxFileAge))
|
|
||||||
@unlink($filePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
closedir($dir);
|
|
||||||
} else
|
|
||||||
die('{"jsonrpc" : "2.0", "error" : {"code": 100, "message": "Failed to open temp directory."}, "id" : "id"}');
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Look for the content type header
|
|
||||||
if (isset($_SERVER["HTTP_CONTENT_TYPE"]))
|
|
||||||
$contentType = $_SERVER["HTTP_CONTENT_TYPE"];
|
|
||||||
|
|
||||||
if (isset($_SERVER["CONTENT_TYPE"]))
|
|
||||||
$contentType = $_SERVER["CONTENT_TYPE"];
|
|
||||||
|
|
||||||
// Handle non multipart uploads older WebKit versions didn't support multipart in HTML5
|
|
||||||
if (strpos($contentType, "multipart") !== false) {
|
|
||||||
if (isset($_FILES['file']['tmp_name']) && is_uploaded_file($_FILES['file']['tmp_name'])) {
|
|
||||||
// Open temp file
|
|
||||||
$out = fopen($targetDir . DIRECTORY_SEPARATOR . $fileName, $chunk == 0 ? "wb" : "ab");
|
|
||||||
if ($out) {
|
|
||||||
// Read binary input stream and append it to temp file
|
|
||||||
$in = fopen($_FILES['file']['tmp_name'], "rb");
|
|
||||||
|
|
||||||
if ($in) {
|
|
||||||
while ($buff = fread($in, 4096))
|
|
||||||
fwrite($out, $buff);
|
|
||||||
} else
|
|
||||||
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "Failed to open input stream."}, "id" : "id"}');
|
|
||||||
fclose($in);
|
|
||||||
fclose($out);
|
|
||||||
@unlink($_FILES['file']['tmp_name']);
|
|
||||||
} else
|
|
||||||
die('{"jsonrpc" : "2.0", "error" : {"code": 102, "message": "Failed to open output stream."}, "id" : "id"}');
|
|
||||||
} else
|
|
||||||
die('{"jsonrpc" : "2.0", "error" : {"code": 103, "message": "Failed to move uploaded file."}, "id" : "id"}');
|
|
||||||
} else {
|
|
||||||
// Open temp file
|
|
||||||
$out = fopen($targetDir . DIRECTORY_SEPARATOR . $fileName, $chunk == 0 ? "wb" : "ab");
|
|
||||||
if ($out) {
|
|
||||||
// Read binary input stream and append it to temp file
|
|
||||||
$in = fopen("php://input", "rb");
|
|
||||||
|
|
||||||
if ($in) {
|
|
||||||
while ($buff = fread($in, 4096))
|
|
||||||
fwrite($out, $buff);
|
|
||||||
} else
|
|
||||||
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "Failed to open input stream."}, "id" : "id"}');
|
|
||||||
|
|
||||||
fclose($in);
|
|
||||||
fclose($out);
|
|
||||||
} else
|
|
||||||
die('{"jsonrpc" : "2.0", "error" : {"code": 102, "message": "Failed to open output stream."}, "id" : "id"}');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return JSON-RPC response
|
|
||||||
die('{"jsonrpc" : "2.0", "result" : null, "id" : "id"}');
|
|
||||||
|
|
||||||
?>
|
|
|
@ -1,25 +1,24 @@
|
||||||
// German
|
// German
|
||||||
plupload.addI18n({
|
plupload.addI18n({
|
||||||
'Select files' : 'Wählen Sie die Dateien:',
|
'Select files' : 'Dateien hochladen',
|
||||||
'Add files to the upload queue and click the start button.' : 'Dateien hinzufügen und danach auf \'Starten des Uploads\' klicken und die Datei hochzuladen.',
|
'Add files to the upload queue and click the start button.' : 'Dateien hinzufügen und auf \'Hochladen\' klicken.',
|
||||||
'Filename' : 'Dateiname',
|
'Filename' : 'Dateiname',
|
||||||
'Status' : 'Status',
|
'Status' : 'Status',
|
||||||
'Size' : 'Größe',
|
'Size' : 'Größe',
|
||||||
'Add files' : 'Hinzufügen von Dateien',
|
'Add files' : 'Dateien', // hinzufügen',
|
||||||
'Stop current upload' : 'Stop aktuellen Upload',
|
'Stop current upload' : 'Aktuelles Hochladen stoppen',
|
||||||
'Start uploading queue' : 'Starte Upload',
|
'Start uploading queue' : 'Hochladen starten',
|
||||||
'Uploaded %d/%d files': '%d/%d Dateien sind Hochgeladen',
|
'Uploaded %d/%d files': '%d/%d Dateien sind hochgeladen',
|
||||||
'N/A' : 'Nicht verfügbar',
|
'N/A' : 'Nicht verfügbar',
|
||||||
'Drag files here.' : 'Ziehen Sie die Dateien hier hin',
|
'Drag files here.' : 'Ziehen Sie die Dateien hier hin',
|
||||||
'File extension error.': 'Dateiendungs Fehler.',
|
'File extension error.': 'Fehler bei Dateiendung',
|
||||||
'File size error.': 'Dateigrößen Fehler.',
|
'File size error.': 'Fehler bei Dateigröße',
|
||||||
'Init error.': 'Initialisierungs Fehler.',
|
'Init error.': 'Initialisierungsfehler',
|
||||||
'HTTP Error.': 'HTTP Fehler.',
|
'HTTP Error.': 'HTTP-Fehler',
|
||||||
'Security error.': 'Sicherheits Fehler.',
|
'Security error.': 'Sicherheitsfehler',
|
||||||
'Generic error.': 'Generic Fehler.',
|
'Generic error.': 'Typischer Fehler',
|
||||||
'IO error.': 'Ein/Ausgabe Fehler.',
|
'IO error.': 'Ein/Ausgabe-Fehler',
|
||||||
'Stop Upload': 'Stoppen des Uploads.',
|
'Stop Upload': 'Hochladen stoppen',
|
||||||
'Add Files': 'Dateien hinzufügen',
|
'Start upload': 'Hochladen',
|
||||||
'Start Upload': 'Starten des Uploads.',
|
'%d files queued': '%d Dateien in der Warteschlange'
|
||||||
'%d files queued': '%d Dateien in der Warteschlange.'
|
|
||||||
});
|
});
|
14
public/javascripts/plupload/js/i18n/el.js
Normal file
14
public/javascripts/plupload/js/i18n/el.js
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
// Greek
|
||||||
|
plupload.addI18n({
|
||||||
|
'Select files' : 'Επιλέξτε Αρχεία',
|
||||||
|
'Add files to the upload queue and click the start button.' : 'Προσθήκη αρχείων στην ουρά μεταφόρτωσης',
|
||||||
|
'Filename' : 'Όνομα αρχείου',
|
||||||
|
'Status' : 'Κατάσταση',
|
||||||
|
'Size' : 'Μέγεθος',
|
||||||
|
'Add Files' : 'Προσθέστε αρχεία',
|
||||||
|
'Stop current upload' : 'Διακοπή τρέχουσας μεταφόρτωσης',
|
||||||
|
'Start uploading queue' : 'Εκκίνηση μεταφόρτωσης ουράς αρχείων',
|
||||||
|
'Drag files here.' : 'Σύρετε αρχεία εδώ',
|
||||||
|
'Start Upload': 'Εκκίνηση μεταφόρτωσης',
|
||||||
|
'Uploaded %d/%d files': 'Ανέβηκαν %d/%d αρχεία'
|
||||||
|
});
|
33
public/javascripts/plupload/js/i18n/et.js
Normal file
33
public/javascripts/plupload/js/i18n/et.js
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
// Estonian translation, et.js
|
||||||
|
plupload.addI18n({
|
||||||
|
'Select files' : 'Vali faile',
|
||||||
|
'Add files to the upload queue and click the start button.' : 'Lisa failid üleslaadimise järjekorda ja klõpsa alustamise nupule.',
|
||||||
|
'Filename' : 'Failinimi',
|
||||||
|
'Status' : 'Olek',
|
||||||
|
'Size' : 'Suurus',
|
||||||
|
'Add files' : 'Lisa faile',
|
||||||
|
'Stop current upload' : 'Praeguse üleslaadimise peatamine',
|
||||||
|
'Start uploading queue' : 'Järjekorras ootavate failide üleslaadimise alustamine',
|
||||||
|
'Drag files here.' : 'Lohista failid siia.',
|
||||||
|
'Start upload' : 'Alusta üleslaadimist',
|
||||||
|
'Uploaded %d/%d files': 'Üles laaditud %d/%d',
|
||||||
|
'Stop upload': 'Peata üleslaadimine',
|
||||||
|
'Start upload': 'Alusta üleslaadimist',
|
||||||
|
'%d files queued': 'Järjekorras on %d faili',
|
||||||
|
'File: %s': 'Fail: %s',
|
||||||
|
'Close': 'Sulge',
|
||||||
|
'Using runtime: ': 'Kasutatakse varianti: ',
|
||||||
|
'File: %f, size: %s, max file size: %m': 'Fail: %f, suurus: %s, suurim failisuurus: %m',
|
||||||
|
'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'Üleslaadimise element saab vastu võtta ainult %d faili ühe korraga. Ülejäänud failid jäetakse laadimata.',
|
||||||
|
'Upload URL might be wrong or doesn\'t exist': 'Üleslaadimise URL võib olla vale või seda pole',
|
||||||
|
'Error: File too large: ': 'Viga: fail on liiga suur: ',
|
||||||
|
'Error: Invalid file extension: ': 'Viga: sobimatu faililaiend: ',
|
||||||
|
'File extension error.': 'Faililaiendi viga.',
|
||||||
|
'File size error.': 'Failisuuruse viga.',
|
||||||
|
'File count error.': 'Failide arvu viga.',
|
||||||
|
'Init error.': 'Lähtestamise viga.',
|
||||||
|
'HTTP Error.': 'HTTP ühenduse viga.',
|
||||||
|
'Security error.': 'Turvaviga.',
|
||||||
|
'Generic error.': 'Üldine viga.',
|
||||||
|
'IO error.': 'S/V (I/O) viga.'
|
||||||
|
});
|
37
public/javascripts/plupload/js/i18n/fa.js
Normal file
37
public/javascripts/plupload/js/i18n/fa.js
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
// Persian
|
||||||
|
plupload.addI18n({
|
||||||
|
'Select files' : 'انتخاب فایل',
|
||||||
|
'Add files to the upload queue and click the start button.' : 'اضافه کنید فایل ها را به صف آپلود و دکمه شروع را کلیک کنید.',
|
||||||
|
'Filename' : 'نام فایل',
|
||||||
|
'Status' : 'وضعیت',
|
||||||
|
'Size' : 'سایز',
|
||||||
|
'Add Files' : 'افزودن فایل',
|
||||||
|
'Stop Upload' : 'توقف انتقال',
|
||||||
|
'Start Upload' : 'شروع انتقال',
|
||||||
|
'Add files' : 'افزودن فایل',
|
||||||
|
'Add files.' : 'افزودن فایل',
|
||||||
|
'Stop current upload' : 'توقف انتقال جاری',
|
||||||
|
'Start uploading queue' : 'شروع صف انتقال',
|
||||||
|
'Stop upload' : 'توقف انتقال',
|
||||||
|
'Start upload' : 'شروع انتقال',
|
||||||
|
'Uploaded %d/%d files': 'منتقل شد %d/%d از فایلها',
|
||||||
|
'N/A' : 'N/A',
|
||||||
|
'Drag files here.' : 'بکشید فایل ها رو به اینجا',
|
||||||
|
'File extension error.': 'خطا پیشوند فایل',
|
||||||
|
'File size error.': 'خطای سایز فایل',
|
||||||
|
'File count error.': 'خطای تعداد فایل',
|
||||||
|
'Init error.': 'خطا در استارت اسکریپت',
|
||||||
|
'HTTP Error.': 'HTTP خطای',
|
||||||
|
'Security error.': 'خطای امنیتی',
|
||||||
|
'Generic error.': 'خطای عمومی',
|
||||||
|
'IO error.': 'IO خطای',
|
||||||
|
'File: %s': ' فایل ها : %s',
|
||||||
|
'Close': 'بستن',
|
||||||
|
'%d files queued': '%d فایل در صف',
|
||||||
|
'Using runtime: ': 'استفاده میکنید از : ',
|
||||||
|
'File: %f, size: %s, max file size: %m': فایل: %f, سایز: %s, بزرگترین سایز فایل: %m',
|
||||||
|
'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'عنصر بارگذار فقط %d فایل رو در یک زمان می پذیرد. سایر فایل ها مجرد از این موضوع هستند.',
|
||||||
|
'Upload URL might be wrong or doesn\'t exist': 'آدرس آپلود اشتباه می باشد یا وجود ندارد',
|
||||||
|
'Error: File too large: ': 'خطا: فایل حجیم است :: ',
|
||||||
|
'Error: Invalid file extension: ': 'خطا پسوند فایل معتبر نمی باشد : '
|
||||||
|
});
|
33
public/javascripts/plupload/js/i18n/fi.js
Normal file
33
public/javascripts/plupload/js/i18n/fi.js
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
// .fi file like language pack
|
||||||
|
plupload.addI18n({
|
||||||
|
'Select files' : 'Valitse tiedostoja',
|
||||||
|
'Add files to the upload queue and click the start button.' : 'Lisää tiedostoja latausjonoon ja klikkaa aloita-nappia.',
|
||||||
|
'Filename' : 'Tiedostonimi',
|
||||||
|
'Status' : 'Tila',
|
||||||
|
'Size' : 'Koko',
|
||||||
|
'Add files' : 'Lisää tiedostoja',
|
||||||
|
'Stop current upload' : 'Pysäytä nykyinen lataus',
|
||||||
|
'Start uploading queue' : 'Aloita jonon lataus',
|
||||||
|
'Drag files here.' : 'Raahaa tiedostot tänne.',
|
||||||
|
'Start upload' : 'Aloita lataus',
|
||||||
|
'Uploaded %d/%d files': 'Ladattu %d/%d tiedostoa',
|
||||||
|
'Stop upload': 'Pysäytä lataus',
|
||||||
|
'Start upload': 'Aloita lataus',
|
||||||
|
'%d files queued': '%d tiedostoa jonossa',
|
||||||
|
'File: %s': 'Tiedosto: %s',
|
||||||
|
'Close': 'Sulje',
|
||||||
|
'Using runtime: ': 'Käytetään ajonaikaista: ',
|
||||||
|
'File: %f, size: %s, max file size: %m': 'Tiedosto: %f, koko: %s, maksimi tiedostokoko: %m',
|
||||||
|
'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'Latauselementti sallii ladata vain %d tiedosto(a) kerrallaan. Ylimääräiset tiedostot ohitettiin.',
|
||||||
|
'Upload URL might be wrong or doesn\'t exist': 'Lataus URL saattaa olla väärin tai ei ole olemassa',
|
||||||
|
'Error: File too large: ': 'Virhe: Tiedosto liian suuri: ',
|
||||||
|
'Error: Invalid file extension: ': 'Virhe: Kelpaamaton tiedostopääte: ',
|
||||||
|
'File extension error.': 'Tiedostopäätevirhe.',
|
||||||
|
'File size error.': 'Tiedostokokovirhe.',
|
||||||
|
'File count error.': 'Tiedostolaskentavirhe.',
|
||||||
|
'Init error.': 'Init virhe.',
|
||||||
|
'HTTP Error.': 'HTTP virhe.',
|
||||||
|
'Security error.': 'Tietoturvavirhe.',
|
||||||
|
'Generic error.': 'Yleinen virhe.',
|
||||||
|
'IO error.': 'I/O virhe.'
|
||||||
|
});
|
35
public/javascripts/plupload/js/i18n/fr-ca.js
Normal file
35
public/javascripts/plupload/js/i18n/fr-ca.js
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
// French-Canadian
|
||||||
|
plupload.addI18n({
|
||||||
|
'Select files' : 'Sélectionnez les fichiers',
|
||||||
|
'Add files to the upload queue and click the start button.' : 'Ajoutez des fichiers à la file d\'attente et appuyez sur le bouton démarrer.',
|
||||||
|
'Filename' : 'Nom du fichier',
|
||||||
|
'Status' : 'Statut',
|
||||||
|
'Size' : 'Taille',
|
||||||
|
'Add files' : 'Ajouter Fichiers',
|
||||||
|
'Stop current upload' : 'Arrêter le téléversement actuel',
|
||||||
|
'Start uploading queue' : 'Démarrer le téléversement',
|
||||||
|
'Uploaded %d/%d files': '%d/%d fichiers envoyés',
|
||||||
|
'N/A' : 'Non applicable',
|
||||||
|
'Drag files here.' : 'Glisser-déposer les fichiers ici',
|
||||||
|
'File extension error.': 'Erreur d\'extension de fichier',
|
||||||
|
'File size error.': 'Erreur de taille de fichier',
|
||||||
|
'Init error.': 'Erreur d\'initialisation',
|
||||||
|
'HTTP Error.': 'Erreur HTTP',
|
||||||
|
'Security error.': 'Erreur de sécurité',
|
||||||
|
'Generic error.': 'Erreur commune',
|
||||||
|
'IO error.': 'Erreur E/S',
|
||||||
|
'Stop Upload': 'Arrêter le téléversement',
|
||||||
|
'Add Files': 'Ajouter des fichiers',
|
||||||
|
'Start upload': 'Démarrer le téléversement',
|
||||||
|
'%d files queued': '%d fichiers en attente',
|
||||||
|
'File: %s':'Fichier: %s',
|
||||||
|
'Close':'Fermer',
|
||||||
|
'Using runtime:':'Moteur logiciel:',
|
||||||
|
'File: %f, size: %s, max file size: %m':'Fichier: %f, poids: %s, poids maximal: %m',
|
||||||
|
'Upload element accepts only %d file(s) at a time. Extra files were stripped.':'La file accepte %d fichier(s) à la fois. Les fichiers en trop sont ignorés',
|
||||||
|
'Upload URL might be wrong or doesn\'t exist':'L\'URL de téléversement est erroné ou inexistant',
|
||||||
|
'Error: File to large: ':'Fichier trop volumineux: ',
|
||||||
|
'Error: Invalid file extension: ':'Extension de fichier invalide: ',
|
||||||
|
'File size error.':'Erreur de taile de fichier',
|
||||||
|
'File count error.':'Erreur de décompte des fichiers'
|
||||||
|
});
|
|
@ -1,4 +1,4 @@
|
||||||
// .po file like language pack
|
// French
|
||||||
plupload.addI18n({
|
plupload.addI18n({
|
||||||
'Select files' : 'Sélectionnez les fichiers',
|
'Select files' : 'Sélectionnez les fichiers',
|
||||||
'Add files to the upload queue and click the start button.' : 'Ajoutez des fichiers à la file et appuyez sur le bouton démarrer.',
|
'Add files to the upload queue and click the start button.' : 'Ajoutez des fichiers à la file et appuyez sur le bouton démarrer.',
|
||||||
|
|
25
public/javascripts/plupload/js/i18n/hr.js
Normal file
25
public/javascripts/plupload/js/i18n/hr.js
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
// Croatian
|
||||||
|
plupload.addI18n({
|
||||||
|
'Select files': 'Izaberite datoteke:',
|
||||||
|
'Add files to the upload queue and click the start button.': 'Dodajte datoteke u listu i kliknite Upload.',
|
||||||
|
'Filename': 'Ime datoteke',
|
||||||
|
'Status': 'Status',
|
||||||
|
'Size': 'Veličina',
|
||||||
|
'Add files': 'Dodajte datoteke',
|
||||||
|
'Stop current upload': 'Zaustavi trenutan upload',
|
||||||
|
'Start uploading queue': 'Pokreni Upload',
|
||||||
|
'Uploaded %d/%d files': 'Uploadano %d/%d datoteka',
|
||||||
|
'N/A': 'N/A',
|
||||||
|
'Drag files here.': 'Dovucite datoteke ovdje',
|
||||||
|
'File extension error.': 'Greška ekstenzije datoteke.',
|
||||||
|
'File size error.': 'Greška veličine datoteke.',
|
||||||
|
'Init error.': 'Greška inicijalizacije.',
|
||||||
|
'HTTP Error.': 'HTTP greška.',
|
||||||
|
'Security error.': 'Sigurnosna greška.',
|
||||||
|
'Generic error.': 'Generička greška.',
|
||||||
|
'IO error.': 'I/O greška.',
|
||||||
|
'Stop Upload': 'Zaustavi upload.',
|
||||||
|
'Add Files': 'Dodaj datoteke',
|
||||||
|
'Start Upload': 'Pokreni upload.',
|
||||||
|
'%d files queued': '%d datoteka na čekanju.'
|
||||||
|
});
|
33
public/javascripts/plupload/js/i18n/hu.js
Normal file
33
public/javascripts/plupload/js/i18n/hu.js
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
// Hungarian
|
||||||
|
plupload.addI18n({
|
||||||
|
'Select files' : 'Fájlok kiválasztása',
|
||||||
|
'Add files to the upload queue and click the start button.' : 'Válaszd ki a fájlokat, majd kattints az Indítás gombra.',
|
||||||
|
'Filename' : 'Fájlnév',
|
||||||
|
'Status' : 'Állapot',
|
||||||
|
'Size' : 'Méret',
|
||||||
|
'Add files' : 'Hozzáadás',
|
||||||
|
'Stop current upload' : 'Jelenlegi feltöltés megszakítása',
|
||||||
|
'Start uploading queue' : 'Várakozási sor feltöltésének indítása',
|
||||||
|
'Uploaded %d/%d files': 'Feltöltött fájlok: %d/%d',
|
||||||
|
'N/A': 'Nem elérhető',
|
||||||
|
'Drag files here.' : 'Húzd ide a fájlokat.',
|
||||||
|
'Stop upload': 'Feltöltés megszakítása',
|
||||||
|
'Start upload': 'Indítás',
|
||||||
|
'%d files queued': '%d fájl sorbaállítva',
|
||||||
|
'File: %s': 'Fájl: %s',
|
||||||
|
'Close': 'Bezárás',
|
||||||
|
'Using runtime: ': 'Használt runtime: ',
|
||||||
|
'File: %f, size: %s, max file size: %m': 'Fájl: %f, méret: %s, maximális fájlméret: %m',
|
||||||
|
'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'A feltöltés egyszerre csak %d fájlt fogad el, a többi fájl nem lesz feltöltve.',
|
||||||
|
'Upload URL might be wrong or doesn\'t exist': 'A megadott URL hibás vagy nem létezik',
|
||||||
|
'Error: File too large: ': 'Hiba: A fájl túl nagy: ',
|
||||||
|
'Error: Invalid file extension: ': 'Hiba: Érvénytelen fájlkiterjesztés: ',
|
||||||
|
'File extension error.': 'Hibás fájlkiterjesztés.',
|
||||||
|
'File size error.': 'Hibás fájlméret.',
|
||||||
|
'File count error.': 'A fájlok számával kapcsolatos hiba.',
|
||||||
|
'Init error.': 'Init hiba.',
|
||||||
|
'HTTP Error.': 'HTTP hiba.',
|
||||||
|
'Security error.': 'Biztonsági hiba.',
|
||||||
|
'Generic error.': 'Általános hiba.',
|
||||||
|
'IO error.': 'I/O hiba.'
|
||||||
|
});
|
|
@ -1,11 +1,11 @@
|
||||||
// .po file like language pack
|
// Italian
|
||||||
plupload.addI18n({
|
plupload.addI18n({
|
||||||
'Select files' : 'Seleziona i files',
|
'Select files' : 'Seleziona i files',
|
||||||
'Add files to the upload queue and click the start button.' : 'Aggiungi i file alla coda di caricamento e clicca il pulsante di avvio.',
|
'Add files to the upload queue and click the start button.' : 'Aggiungi i file alla coda di caricamento e clicca il pulsante di avvio.',
|
||||||
'Filename' : 'Nome file',
|
'Filename' : 'Nome file',
|
||||||
'Status' : 'Stato',
|
'Status' : 'Stato',
|
||||||
'Size' : 'Dimensione',
|
'Size' : 'Dimensione',
|
||||||
'Add files' : 'Aggiungi file',
|
'Add Files' : 'Aggiungi file',
|
||||||
'Stop current upload' : 'Interrompi il caricamento',
|
'Stop current upload' : 'Interrompi il caricamento',
|
||||||
'Start uploading queue' : 'Avvia il caricamento',
|
'Start uploading queue' : 'Avvia il caricamento',
|
||||||
'Uploaded %d/%d files': 'Caricati %d/%d file',
|
'Uploaded %d/%d files': 'Caricati %d/%d file',
|
||||||
|
@ -17,5 +17,8 @@ plupload.addI18n({
|
||||||
'HTTP Error.': 'Errore HTTP.',
|
'HTTP Error.': 'Errore HTTP.',
|
||||||
'Security error.': 'Errore sicurezza.',
|
'Security error.': 'Errore sicurezza.',
|
||||||
'Generic error.': 'Errore generico.',
|
'Generic error.': 'Errore generico.',
|
||||||
'IO error.': 'Errore IO.'
|
'IO error.': 'Errore IO.',
|
||||||
|
'Stop Upload': 'Ferma Upload',
|
||||||
|
'Start Upload': 'Inizia Upload',
|
||||||
|
'%d files queued': '%d file in lista'
|
||||||
});
|
});
|
36
public/javascripts/plupload/js/i18n/ko.js
Normal file
36
public/javascripts/plupload/js/i18n/ko.js
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
// Republic of Korea
|
||||||
|
plupload.addI18n({
|
||||||
|
'Select files' : '파일 선택',
|
||||||
|
'Add files to the upload queue and click the start button.' : '파일을 업로드 큐에 추가하여 시작 버튼을 클릭하십시오.',
|
||||||
|
'Filename' : '파일 이름',
|
||||||
|
'Status' : '상태',
|
||||||
|
'Size' : '크기',
|
||||||
|
'Add Files' : '파일 추가',
|
||||||
|
'Stop Upload': '업로드 중지',
|
||||||
|
'Start Upload': '업로드',
|
||||||
|
'Add files': '파일 추가',
|
||||||
|
'Stop current upload': '현재 업로드를 정지',
|
||||||
|
'Start uploading queue': '업로드',
|
||||||
|
'Stop upload': '업로드 중지',
|
||||||
|
'Start upload': '업로드',
|
||||||
|
'Uploaded % d / % d files': '업로드 중 % d / % d 파일',
|
||||||
|
'N / A': 'N / A',
|
||||||
|
'Drag files here': '여기에 파일을 드래그',
|
||||||
|
'File extension error': '파일 확장자 오류',
|
||||||
|
'File size error': '파일 크기 오류',
|
||||||
|
'File count error': '이미지 : 오류',
|
||||||
|
'Init error': '초기화 오류',
|
||||||
|
'HTTP Error': 'HTTP 오류',
|
||||||
|
'Security error': '보안 오류',
|
||||||
|
'Generic error': '오류',
|
||||||
|
'IO error': 'IO 오류',
|
||||||
|
'File : % s': '파일 % s',
|
||||||
|
'Close': '닫기',
|
||||||
|
'% d files queued': '% d 파일이 추가되었습니다',
|
||||||
|
'Using runtime :': '모드',
|
||||||
|
'File : % f, size : % s, max file size : % m': '파일 : % f, 크기 : % s, 최대 파일 크기 : % m',
|
||||||
|
'Upload element accepts only % d file (s) at a time. Extra files were stripped': '업로드 가능한 파일의 수는 % d입니다. 불필요한 파일은 삭제되었습니다 ',
|
||||||
|
'Upload URL might be wrong or doesn \'t exist ':'업로드할 URL이 존재하지 않습니다 ',
|
||||||
|
'Error : File too large :': '오류 : 크기가 너무 큽니다',
|
||||||
|
'Error : Invalid file extension :': '오류 : 확장자가 허용되지 않습니다 :'
|
||||||
|
});
|
24
public/javascripts/plupload/js/i18n/pl.js
Normal file
24
public/javascripts/plupload/js/i18n/pl.js
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
plupload.addI18n({
|
||||||
|
'Select files' : 'Wybierz pliki:',
|
||||||
|
'Add files to the upload queue and click the start button.' : 'Dodaj pliki i kliknij \'Rozpocznij transfer\'.',
|
||||||
|
'Filename' : 'Nazwa pliku',
|
||||||
|
'Status' : 'Status',
|
||||||
|
'Size' : 'Rozmiar',
|
||||||
|
'Add files' : 'Dodaj pliki',
|
||||||
|
'Stop current upload' : 'Przerwij aktualny transfer',
|
||||||
|
'Start uploading queue' : 'Rozpocznij wysyłanie',
|
||||||
|
'Uploaded %d/%d files': 'Wysłano %d/%d plików',
|
||||||
|
'N/A' : 'Nie dostępne',
|
||||||
|
'Drag files here.' : 'Przeciągnij tu pliki',
|
||||||
|
'File extension error.': 'Nieobsługiwany format pliku.',
|
||||||
|
'File size error.': 'Plik jest zbyt duży.',
|
||||||
|
'Init error.': 'Błąd inicjalizacji.',
|
||||||
|
'HTTP Error.': 'Błąd HTTP.',
|
||||||
|
'Security error.': 'Błąd bezpieczeństwa.',
|
||||||
|
'Generic error.': 'Błąd ogólny.',
|
||||||
|
'IO error.': 'Błąd IO.',
|
||||||
|
'Stop Upload': 'Przerwij transfer.',
|
||||||
|
'Add Files': 'Dodaj pliki',
|
||||||
|
'Start upload': 'Rozpocznij transfer.',
|
||||||
|
'%d files queued': '%d plików w kolejce.'
|
||||||
|
});
|
24
public/javascripts/plupload/js/i18n/ro.js
Normal file
24
public/javascripts/plupload/js/i18n/ro.js
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
// Romanian
|
||||||
|
plupload.addI18n({
|
||||||
|
'Select files' : 'Selectare fişiere',
|
||||||
|
'Add files to the upload queue and click the start button.' : 'Adaugă fişiere în lista apoi apasă butonul \'Începe încărcare\'.',
|
||||||
|
'Filename' : 'Nume fişier',
|
||||||
|
'Status' : 'Stare',
|
||||||
|
'Size' : 'Mărime',
|
||||||
|
'Add files' : 'Adăugare fişiere',
|
||||||
|
'Stop current upload' : 'Întrerupe încărcarea curentă',
|
||||||
|
'Start uploading queue' : 'Începe incărcarea',
|
||||||
|
'Uploaded %d/%d files': 'Fişiere încărcate %d/%d',
|
||||||
|
'N/A' : 'N/A',
|
||||||
|
'Drag files here.' : 'Trage aici fişierele',
|
||||||
|
'File extension error.': 'Extensie fişier eronată',
|
||||||
|
'File size error.': 'Eroare dimensiune fişier',
|
||||||
|
'Init error.': 'Eroare iniţializare',
|
||||||
|
'HTTP Error.': 'Eroare HTTP',
|
||||||
|
'Security error.': 'Eroare securitate',
|
||||||
|
'Generic error.': 'Eroare generică',
|
||||||
|
'IO error.': 'Eroare Intrare/Ieşire',
|
||||||
|
'Stop Upload': 'Oprire încărcare',
|
||||||
|
'Start upload': 'Începe încărcare',
|
||||||
|
'%d files queued': '%d fişiere listate'
|
||||||
|
});
|
14
public/javascripts/plupload/js/i18n/sr.js
Normal file
14
public/javascripts/plupload/js/i18n/sr.js
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
// Serbian
|
||||||
|
plupload.addI18n({
|
||||||
|
'Select files' : 'Izaberite fajlove',
|
||||||
|
'Add files to the upload queue and click the start button.' : 'Dodajte fajlove u listu i kliknite na dugme Start.',
|
||||||
|
'Filename' : 'Naziv fajla',
|
||||||
|
'Status' : 'Status',
|
||||||
|
'Size' : 'Veličina',
|
||||||
|
'Add Files' : 'Dodaj fajlove',
|
||||||
|
'Stop current upload' : 'Zaustavi upload',
|
||||||
|
'Start uploading queue' : 'Počni upload',
|
||||||
|
'Drag files here.' : 'Prevucite fajlove ovde.',
|
||||||
|
'Start Upload': 'Počni upload',
|
||||||
|
'Uploaded %d/%d files': 'Snimljeno %d/%d fajlova'
|
||||||
|
});
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
(function(a){a.runtimes.BrowserPlus=a.addRuntime("browserplus",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(g,i){var e=window.BrowserPlus,h={},d=g.settings,c=d.resize;function f(n){var m,l,j=[],k,o;for(l=0;l<n.length;l++){k=n[l];o=a.guid();h[o]=k;j.push(new a.File(o,k.name,k.size))}if(l){g.trigger("FilesAdded",j)}}function b(){g.bind("PostInit",function(){var m,k=d.drop_element,o=g.id+"_droptarget",j=document.getElementById(k),l;function p(r,q){e.DragAndDrop.AddDropTarget({id:r},function(s){e.DragAndDrop.AttachCallbacks({id:r,hover:function(t){if(!t&&q){q()}},drop:function(t){if(q){q()}f(t)}},function(){})})}function n(){document.getElementById(o).style.top="-1000px"}if(j){if(document.attachEvent&&(/MSIE/gi).test(navigator.userAgent)){m=document.createElement("div");m.setAttribute("id",o);a.extend(m.style,{position:"absolute",top:"-1000px",background:"red",filter:"alpha(opacity=0)",opacity:0});document.body.appendChild(m);a.addEvent(j,"dragenter",function(r){var q,s;q=document.getElementById(k);s=a.getPos(q);a.extend(document.getElementById(o).style,{top:s.y+"px",left:s.x+"px",width:q.offsetWidth+"px",height:q.offsetHeight+"px"})});p(o,n)}else{p(k)}}a.addEvent(document.getElementById(d.browse_button),"click",function(v){var t=[],r,q,u=d.filters,s;v.preventDefault();no_type_restriction:for(r=0;r<u.length;r++){s=u[r].extensions.split(",");for(q=0;q<s.length;q++){if(s[q]==="*"){t=[];break no_type_restriction}t.push(a.mimeTypes[s[q]])}}e.FileBrowse.OpenBrowseDialog({mimeTypes:t},function(w){if(w.success){f(w.value)}})});j=m=null});g.bind("UploadFile",function(m,j){var l=h[j.id],r={},k=m.settings.chunk_size,n,o=[];function q(s,u){var t;if(j.status==a.FAILED){return}r.name=j.target_name||j.name;if(k){r.chunk=""+s;r.chunks=""+u}t=o.shift();e.Uploader.upload({url:m.settings.url,files:{file:t},cookies:document.cookies,postvars:a.extend(r,m.settings.multipart_params),progressCallback:function(x){var w,v=0;n[s]=parseInt(x.filePercent*t.size/100,10);for(w=0;w<n.length;w++){v+=n[w]}j.loaded=v;m.trigger("UploadProgress",j)}},function(w){var v,x;if(w.success){v=w.value.statusCode;if(k){m.trigger("ChunkUploaded",j,{chunk:s,chunks:u,response:w.value.body,status:v})}if(o.length>0){q(++s,u)}else{j.status=a.DONE;m.trigger("FileUploaded",j,{response:w.value.body,status:v});if(v>=400){m.trigger("Error",{code:a.HTTP_ERROR,message:a.translate("HTTP Error."),file:j,status:v})}}}else{m.trigger("Error",{code:a.GENERIC_ERROR,message:a.translate("Generic Error."),file:j,details:w.error})}})}function p(s){j.size=s.size;if(k){e.FileAccess.chunk({file:s,chunkSize:k},function(v){if(v.success){var w=v.value,t=w.length;n=Array(t);for(var u=0;u<t;u++){n[u]=0;o.push(w[u])}q(0,t)}})}else{n=Array(1);o.push(s);q(0,1)}}if(c&&/\.(png|jpg|jpeg)$/i.test(j.name)){BrowserPlus.ImageAlter.transform({file:l,quality:c.quality||90,actions:[{scale:{maxwidth:c.width,maxheight:c.height}}]},function(s){if(s.success){p(s.value.file)}})}else{p(l)}});i({success:true})}if(e){e.init(function(k){var j=[{service:"Uploader",version:"3"},{service:"DragAndDrop",version:"1"},{service:"FileBrowse",version:"1"},{service:"FileAccess",version:"2"}];if(c){j.push({service:"ImageAlter",version:"4"})}if(k.success){e.require({services:j},function(l){if(l.success){b()}else{i()}})}else{i()}})}else{i()}}})})(plupload);
|
(function(a){a.runtimes.BrowserPlus=a.addRuntime("browserplus",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(g,i){var e=window.BrowserPlus,h={},d=g.settings,c=d.resize;function f(n){var m,l,j=[],k,o;for(l=0;l<n.length;l++){k=n[l];o=a.guid();h[o]=k;j.push(new a.File(o,k.name,k.size))}if(l){g.trigger("FilesAdded",j)}}function b(){var j=false;g.bind("PostInit",function(){var n,l=d.drop_element,p=g.id+"_droptarget",k=document.getElementById(l),m;function q(s,r){e.DragAndDrop.AddDropTarget({id:s},function(t){e.DragAndDrop.AttachCallbacks({id:s,hover:function(u){if(!u&&r){r()}},drop:function(u){if(r){r()}f(u)}},function(){})})}function o(){document.getElementById(p).style.top="-1000px"}if(k){if(document.attachEvent&&(/MSIE/gi).test(navigator.userAgent)){n=document.createElement("div");n.setAttribute("id",p);a.extend(n.style,{position:"absolute",top:"-1000px",background:"red",filter:"alpha(opacity=0)",opacity:0});document.body.appendChild(n);a.addEvent(k,"dragenter",function(s){var r,t;r=document.getElementById(l);t=a.getPos(r);a.extend(document.getElementById(p).style,{top:t.y+"px",left:t.x+"px",width:r.offsetWidth+"px",height:r.offsetHeight+"px"})});q(p,o)}else{q(l)}}a.addEvent(document.getElementById(d.browse_button),"click",function(x){var r=[],t,s,w=d.filters,v,u;x.preventDefault();if(j){return}no_type_restriction:for(t=0;t<w.length;t++){v=w[t].extensions.split(",");for(s=0;s<v.length;s++){if(v[s]==="*"){r=[];break no_type_restriction}u=a.mimeTypes[v[s]];if(u&&a.inArray(u,r)===-1){r.push(a.mimeTypes[v[s]])}}}e.FileBrowse.OpenBrowseDialog({mimeTypes:r},function(y){if(y.success){f(y.value)}})});k=n=null});g.bind("CancelUpload",function(){e.Uploader.cancel({},function(){})});g.bind("DisableBrowse",function(k,l){j=l});g.bind("UploadFile",function(n,k){var m=h[k.id],s={},l=n.settings.chunk_size,o,p=[];function r(t,v){var u;if(k.status==a.FAILED){return}s.name=k.target_name||k.name;if(l){s.chunk=""+t;s.chunks=""+v}u=p.shift();e.Uploader.upload({url:n.settings.url,files:{file:u},cookies:document.cookies,postvars:a.extend(s,n.settings.multipart_params),progressCallback:function(y){var x,w=0;o[t]=parseInt(y.filePercent*u.size/100,10);for(x=0;x<o.length;x++){w+=o[x]}k.loaded=w;n.trigger("UploadProgress",k)}},function(x){var w,y;if(x.success){w=x.value.statusCode;if(l){n.trigger("ChunkUploaded",k,{chunk:t,chunks:v,response:x.value.body,status:w})}if(p.length>0){r(++t,v)}else{k.status=a.DONE;n.trigger("FileUploaded",k,{response:x.value.body,status:w});if(w>=400){n.trigger("Error",{code:a.HTTP_ERROR,message:a.translate("HTTP Error."),file:k,status:w})}}}else{n.trigger("Error",{code:a.GENERIC_ERROR,message:a.translate("Generic Error."),file:k,details:x.error})}})}function q(t){k.size=t.size;if(l){e.FileAccess.chunk({file:t,chunkSize:l},function(w){if(w.success){var x=w.value,u=x.length;o=Array(u);for(var v=0;v<u;v++){o[v]=0;p.push(x[v])}r(0,u)}})}else{o=Array(1);p.push(t);r(0,1)}}if(c&&/\.(png|jpg|jpeg)$/i.test(k.name)){BrowserPlus.ImageAlter.transform({file:m,quality:c.quality||90,actions:[{scale:{maxwidth:c.width,maxheight:c.height}}]},function(t){if(t.success){q(t.value.file)}})}else{q(m)}});i({success:true})}if(e){e.init(function(k){var j=[{service:"Uploader",version:"3"},{service:"DragAndDrop",version:"1"},{service:"FileBrowse",version:"1"},{service:"FileAccess",version:"2"}];if(c){j.push({service:"ImageAlter",version:"4"})}if(k.success){e.require({services:j},function(l){if(l.success){b()}else{i()}})}else{i()}})}else{i()}}})})(plupload);
|
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
(function(){if(window.google&&google.gears){return}var a=null;if(typeof GearsFactory!="undefined"){a=new GearsFactory()}else{try{a=new ActiveXObject("Gears.Factory");if(a.getBuildInfo().indexOf("ie_mobile")!=-1){a.privateSetGlobalObject(this)}}catch(b){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){a=document.createElement("object");a.style.display="none";a.width=0;a.height=0;a.type="application/x-googlegears";document.documentElement.appendChild(a)}}}if(!a){return}if(!window.google){window.google={}}if(!google.gears){google.gears={factory:a}}})();(function(e,b,c,d){var f={};function a(h,j,l){var g,i,k,n;i=google.gears.factory.create("beta.canvas");try{i.decode(h);if(!j.width){j.width=i.width}if(!j.height){j.height=i.height}n=Math.min(width/i.width,height/i.height);if(n<1||(n===1&&l==="image/jpeg")){i.resize(Math.round(i.width*n),Math.round(i.height*n));if(j.quality){return i.encode(l,{quality:j.quality/100})}return i.encode(l)}}catch(m){}return h}c.runtimes.Gears=c.addRuntime("gears",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(i,k){var j;if(!e.google||!google.gears){return k({success:false})}try{j=google.gears.factory.create("beta.desktop")}catch(h){return k({success:false})}function g(n){var m,l,o=[],p;for(l=0;l<n.length;l++){m=n[l];p=c.guid();f[p]=m.blob;o.push(new c.File(p,m.name,m.blob.length))}i.trigger("FilesAdded",o)}i.bind("PostInit",function(){var m=i.settings,l=b.getElementById(m.drop_element);if(l){c.addEvent(l,"dragover",function(n){j.setDropEffect(n,"copy");n.preventDefault()},i.id);c.addEvent(l,"drop",function(o){var n=j.getDragData(o,"application/x-gears-files");if(n){g(n.files)}o.preventDefault()},i.id);l=0}c.addEvent(b.getElementById(m.browse_button),"click",function(r){var q=[],o,n,p;r.preventDefault();no_type_restriction:for(o=0;o<m.filters.length;o++){p=m.filters[o].extensions.split(",");for(n=0;n<p.length;n++){if(p[n]==="*"){q=[];break no_type_restriction}q.push("."+p[n])}}j.openFiles(g,{singleFile:!m.multi_selection,filter:q})},i.id)});i.bind("UploadFile",function(r,o){var t=0,s,p,q=0,n=r.settings.resize,l;if(n&&/\.(png|jpg|jpeg)$/i.test(o.name)){f[o.id]=a(f[o.id],n,/\.png$/i.test(o.name)?"image/png":"image/jpeg")}o.size=f[o.id].length;p=r.settings.chunk_size;l=p>0;s=Math.ceil(o.size/p);if(!l){p=o.size;s=1}function m(){var y,A,v=r.settings.multipart,u=0,z={name:o.target_name||o.name},w=r.settings.url;function x(C){var B,H="----pluploadboundary"+c.guid(),E="--",G="\r\n",D,F;if(v){y.setRequestHeader("Content-Type","multipart/form-data; boundary="+H);B=google.gears.factory.create("beta.blobbuilder");c.each(c.extend(z,r.settings.multipart_params),function(J,I){B.append(E+H+G+'Content-Disposition: form-data; name="'+I+'"'+G+G);B.append(J+G)});F=c.mimeTypes[o.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream";B.append(E+H+G+'Content-Disposition: form-data; name="'+r.settings.file_data_name+'"; filename="'+o.name+'"'+G+"Content-Type: "+F+G+G);B.append(C);B.append(G+E+H+E+G);D=B.getAsBlob();u=D.length-C.length;C=D}y.send(C)}if(o.status==c.DONE||o.status==c.FAILED||r.state==c.STOPPED){return}if(l){z.chunk=t;z.chunks=s}A=Math.min(p,o.size-(t*p));if(!v){w=c.buildUrl(r.settings.url,z)}y=google.gears.factory.create("beta.httprequest");y.open("POST",w);if(!v){y.setRequestHeader("Content-Disposition",'attachment; filename="'+o.name+'"');y.setRequestHeader("Content-Type","application/octet-stream")}c.each(r.settings.headers,function(C,B){y.setRequestHeader(B,C)});y.upload.onprogress=function(B){o.loaded=q+B.loaded-u;r.trigger("UploadProgress",o)};y.onreadystatechange=function(){var B;if(y.readyState==4){if(y.status==200){B={chunk:t,chunks:s,response:y.responseText,status:y.status};r.trigger("ChunkUploaded",o,B);if(B.cancelled){o.status=c.FAILED;return}q+=A;if(++t>=s){o.status=c.DONE;r.trigger("FileUploaded",o,{response:y.responseText,status:y.status})}else{m()}}else{r.trigger("Error",{code:c.HTTP_ERROR,message:c.translate("HTTP Error."),file:o,chunk:t,chunks:s,status:y.status})}}};if(t<s){x(f[o.id].slice(t*p,A))}}m()});i.bind("Destroy",function(l){var m,n,o={browseButton:l.settings.browse_button,dropElm:l.settings.drop_element};for(m in o){n=b.getElementById(o[m]);if(n){c.removeAllEvents(n,l.id)}}});k({success:true})}})})(window,document,plupload);
|
(function(){if(window.google&&google.gears){return}var a=null;if(typeof GearsFactory!="undefined"){a=new GearsFactory()}else{try{a=new ActiveXObject("Gears.Factory");if(a.getBuildInfo().indexOf("ie_mobile")!=-1){a.privateSetGlobalObject(this)}}catch(b){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){a=document.createElement("object");a.style.display="none";a.width=0;a.height=0;a.type="application/x-googlegears";document.documentElement.appendChild(a)}}}if(!a){return}if(!window.google){window.google={}}if(!google.gears){google.gears={factory:a}}})();(function(e,b,c,d){var f={};function a(h,j,l){var g,i,k,n;i=google.gears.factory.create("beta.canvas");try{i.decode(h);if(!j.width){j.width=i.width}if(!j.height){j.height=i.height}n=Math.min(width/i.width,height/i.height);if(n<1||(n===1&&l==="image/jpeg")){i.resize(Math.round(i.width*n),Math.round(i.height*n));if(j.quality){return i.encode(l,{quality:j.quality/100})}return i.encode(l)}}catch(m){}return h}c.runtimes.Gears=c.addRuntime("gears",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(k,m){var l,h,g=false;if(!e.google||!google.gears){return m({success:false})}try{l=google.gears.factory.create("beta.desktop")}catch(j){return m({success:false})}function i(p){var o,n,q=[],r;for(n=0;n<p.length;n++){o=p[n];r=c.guid();f[r]=o.blob;q.push(new c.File(r,o.name,o.blob.length))}k.trigger("FilesAdded",q)}k.bind("PostInit",function(){var o=k.settings,n=b.getElementById(o.drop_element);if(n){c.addEvent(n,"dragover",function(p){l.setDropEffect(p,"copy");p.preventDefault()},k.id);c.addEvent(n,"drop",function(q){var p=l.getDragData(q,"application/x-gears-files");if(p){i(p.files)}q.preventDefault()},k.id);n=0}c.addEvent(b.getElementById(o.browse_button),"click",function(t){var s=[],q,p,r;t.preventDefault();if(g){return}no_type_restriction:for(q=0;q<o.filters.length;q++){r=o.filters[q].extensions.split(",");for(p=0;p<r.length;p++){if(r[p]==="*"){s=[];break no_type_restriction}s.push("."+r[p])}}l.openFiles(i,{singleFile:!o.multi_selection,filter:s})},k.id)});k.bind("CancelUpload",function(){if(h.abort){h.abort()}});k.bind("UploadFile",function(t,q){var v=0,u,r,s=0,p=t.settings.resize,n;if(p&&/\.(png|jpg|jpeg)$/i.test(q.name)){f[q.id]=a(f[q.id],p,/\.png$/i.test(q.name)?"image/png":"image/jpeg")}q.size=f[q.id].length;r=t.settings.chunk_size;n=r>0;u=Math.ceil(q.size/r);if(!n){r=q.size;u=1}function o(){var B,x=t.settings.multipart,w=0,A={name:q.target_name||q.name},y=t.settings.url;function z(D){var C,I="----pluploadboundary"+c.guid(),F="--",H="\r\n",E,G;if(x){h.setRequestHeader("Content-Type","multipart/form-data; boundary="+I);C=google.gears.factory.create("beta.blobbuilder");c.each(c.extend(A,t.settings.multipart_params),function(K,J){C.append(F+I+H+'Content-Disposition: form-data; name="'+J+'"'+H+H);C.append(K+H)});G=c.mimeTypes[q.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream";C.append(F+I+H+'Content-Disposition: form-data; name="'+t.settings.file_data_name+'"; filename="'+q.name+'"'+H+"Content-Type: "+G+H+H);C.append(D);C.append(H+F+I+F+H);E=C.getAsBlob();w=E.length-D.length;D=E}h.send(D)}if(q.status==c.DONE||q.status==c.FAILED||t.state==c.STOPPED){return}if(n){A.chunk=v;A.chunks=u}B=Math.min(r,q.size-(v*r));if(!x){y=c.buildUrl(t.settings.url,A)}h=google.gears.factory.create("beta.httprequest");h.open("POST",y);if(!x){h.setRequestHeader("Content-Disposition",'attachment; filename="'+q.name+'"');h.setRequestHeader("Content-Type","application/octet-stream")}c.each(t.settings.headers,function(D,C){h.setRequestHeader(C,D)});h.upload.onprogress=function(C){q.loaded=s+C.loaded-w;t.trigger("UploadProgress",q)};h.onreadystatechange=function(){var C;if(h.readyState==4&&t.state!==c.STOPPED){if(h.status==200){C={chunk:v,chunks:u,response:h.responseText,status:h.status};t.trigger("ChunkUploaded",q,C);if(C.cancelled){q.status=c.FAILED;return}s+=B;if(++v>=u){q.status=c.DONE;t.trigger("FileUploaded",q,{response:h.responseText,status:h.status})}else{o()}}else{t.trigger("Error",{code:c.HTTP_ERROR,message:c.translate("HTTP Error."),file:q,chunk:v,chunks:u,status:h.status})}}};if(v<u){z(f[q.id].slice(v*r,B))}}o()});k.bind("DisableBrowse",function(n,o){g=o});k.bind("Destroy",function(n){var o,p,q={browseButton:n.settings.browse_button,dropElm:n.settings.drop_element};for(o in q){p=b.getElementById(q[o]);if(p){c.removeAllEvents(p,n.id)}}});m({success:true})}})})(window,document,plupload);
|
|
@ -1 +1 @@
|
||||||
(function(d,a,b,c){function e(f){return a.getElementById(f)}b.runtimes.Html4=b.addRuntime("html4",{getFeatures:function(){var f=(function(){var k=navigator,j=k.userAgent,l=k.vendor,h,g,i;h=/WebKit/.test(j);i=h&&l.indexOf("Apple")!==-1;g=d.opera&&d.opera.buildNumber;return{ie:!h&&!g&&(/MSIE/gi).test(j)&&(/Explorer/gi).test(k.appName),webkit:h,gecko:!h&&/Gecko/.test(j),safari:i,safariwin:i&&navigator.platform.indexOf("Win")!==-1,opera:!!g}}());return{multipart:true,triggerDialog:(f.gecko&&d.FormData||f.webkit)}},init:function(f,g){f.bind("Init",function(p){var j=a.body,n,h="javascript",k,x,q,z=[],r=/MSIE/.test(navigator.userAgent),t=[],m=p.settings.filters,o,l,s,w;no_type_restriction:for(o=0;o<m.length;o++){l=m[o].extensions.split(/,/);for(w=0;w<l.length;w++){if(l[w]==="*"){t=[];break no_type_restriction}s=b.mimeTypes[l[w]];if(s){t.push(s)}}}t=t.join(",");function v(){var B,y,i,A;q=b.guid();z.push(q);B=a.createElement("form");B.setAttribute("id","form_"+q);B.setAttribute("method","post");B.setAttribute("enctype","multipart/form-data");B.setAttribute("encoding","multipart/form-data");B.setAttribute("target",p.id+"_iframe");B.style.position="absolute";y=a.createElement("input");y.setAttribute("id","input_"+q);y.setAttribute("type","file");y.setAttribute("accept",t);y.setAttribute("size",1);A=e(p.settings.browse_button);if(p.features.triggerDialog&&A){b.addEvent(e(p.settings.browse_button),"click",function(C){y.click();C.preventDefault()},p.id)}b.extend(y.style,{width:"100%",height:"100%",opacity:0,fontSize:"999px"});b.extend(B.style,{overflow:"hidden"});i=p.settings.shim_bgcolor;if(i){B.style.background=i}if(r){b.extend(y.style,{filter:"alpha(opacity=0)"})}b.addEvent(y,"change",function(F){var D=F.target,C,E=[],G;if(D.value){e("form_"+q).style.top=-1048575+"px";C=D.value.replace(/\\/g,"/");C=C.substring(C.length,C.lastIndexOf("/")+1);E.push(new b.File(q,C));if(!p.features.triggerDialog){b.removeAllEvents(B,p.id)}else{b.removeEvent(A,"click",p.id)}b.removeEvent(y,"change",p.id);v();if(E.length){f.trigger("FilesAdded",E)}}},p.id);B.appendChild(y);j.appendChild(B);p.refresh()}function u(){var i=a.createElement("div");i.innerHTML='<iframe id="'+p.id+'_iframe" name="'+p.id+'_iframe" src="'+h+':""" style="display:none"></iframe>';n=i.firstChild;j.appendChild(n);b.addEvent(n,"load",function(C){var D=C.target,B,y;if(!k){return}try{B=D.contentWindow.document||D.contentDocument||d.frames[D.id].document}catch(A){p.trigger("Error",{code:b.SECURITY_ERROR,message:b.translate("Security error."),file:k});return}y=B.documentElement.innerText||B.documentElement.textContent;if(y){k.status=b.DONE;k.loaded=1025;k.percent=100;p.trigger("UploadProgress",k);p.trigger("FileUploaded",k,{response:y})}},p.id)}if(p.settings.container){j=e(p.settings.container);if(b.getStyle(j,"position")==="static"){j.style.position="relative"}}p.bind("UploadFile",function(i,A){var B,y;if(A.status==b.DONE||A.status==b.FAILED||i.state==b.STOPPED){return}B=e("form_"+A.id);y=e("input_"+A.id);y.setAttribute("name",i.settings.file_data_name);B.setAttribute("action",i.settings.url);b.each(b.extend({name:A.target_name||A.name},i.settings.multipart_params),function(E,C){var D=a.createElement("input");b.extend(D,{type:"hidden",name:C,value:E});B.insertBefore(D,B.firstChild)});k=A;e("form_"+q).style.top=-1048575+"px";B.submit();B.parentNode.removeChild(B)});p.bind("FileUploaded",function(i){i.refresh()});p.bind("StateChanged",function(i){if(i.state==b.STARTED){u()}if(i.state==b.STOPPED){d.setTimeout(function(){b.removeEvent(n,"load",i.id);n.parentNode.removeChild(n)},0)}});p.bind("Refresh",function(y){var F,A,B,C,i,G,H,E,D;F=e(y.settings.browse_button);if(F){i=b.getPos(F,e(y.settings.container));G=b.getSize(F);H=e("form_"+q);E=e("input_"+q);b.extend(H.style,{top:i.y+"px",left:i.x+"px",width:G.w+"px",height:G.h+"px"});if(y.features.triggerDialog){if(b.getStyle(F,"position")==="static"){b.extend(F.style,{position:"relative"})}D=parseInt(F.style.zIndex,10);if(isNaN(D)){D=0}b.extend(F.style,{zIndex:D});b.extend(H.style,{zIndex:D-1})}B=y.settings.browse_button_hover;C=y.settings.browse_button_active;A=y.features.triggerDialog?F:H;if(B){b.addEvent(A,"mouseover",function(){b.addClass(F,B)},y.id);b.addEvent(A,"mouseout",function(){b.removeClass(F,B)},y.id)}if(C){b.addEvent(A,"mousedown",function(){b.addClass(F,C)},y.id);b.addEvent(a.body,"mouseup",function(){b.removeClass(F,C)},y.id)}}});f.bind("FilesRemoved",function(y,B){var A,C;for(A=0;A<B.length;A++){C=e("form_"+B[A].id);if(C){C.parentNode.removeChild(C)}}});f.bind("Destroy",function(i){var y,A,B,C={inputContainer:"form_"+q,inputFile:"input_"+q,browseButton:i.settings.browse_button};for(y in C){A=e(C[y]);if(A){b.removeAllEvents(A,i.id)}}b.removeAllEvents(a.body,i.id);b.each(z,function(E,D){B=e("form_"+E);if(B){j.removeChild(B)}})});v()});g({success:true})}})})(window,document,plupload);
|
(function(d,a,b,c){function e(f){return a.getElementById(f)}b.runtimes.Html4=b.addRuntime("html4",{getFeatures:function(){return{multipart:true,triggerDialog:(b.ua.gecko&&d.FormData||b.ua.webkit)}},init:function(f,g){f.bind("Init",function(p){var j=a.body,n,h="javascript",k,x,q,z=[],r=/MSIE/.test(navigator.userAgent),t=[],m=p.settings.filters,o,l,s,w;no_type_restriction:for(o=0;o<m.length;o++){l=m[o].extensions.split(/,/);for(w=0;w<l.length;w++){if(l[w]==="*"){t=[];break no_type_restriction}s=b.mimeTypes[l[w]];if(s&&b.inArray(s,t)===-1){t.push(s)}}}t=t.join(",");function v(){var B,y,i,A;q=b.guid();z.push(q);B=a.createElement("form");B.setAttribute("id","form_"+q);B.setAttribute("method","post");B.setAttribute("enctype","multipart/form-data");B.setAttribute("encoding","multipart/form-data");B.setAttribute("target",p.id+"_iframe");B.style.position="absolute";y=a.createElement("input");y.setAttribute("id","input_"+q);y.setAttribute("type","file");y.setAttribute("accept",t);y.setAttribute("size",1);A=e(p.settings.browse_button);if(p.features.triggerDialog&&A){b.addEvent(e(p.settings.browse_button),"click",function(C){if(!y.disabled){y.click()}C.preventDefault()},p.id)}b.extend(y.style,{width:"100%",height:"100%",opacity:0,fontSize:"99px",cursor:"pointer"});b.extend(B.style,{overflow:"hidden"});i=p.settings.shim_bgcolor;if(i){B.style.background=i}if(r){b.extend(y.style,{filter:"alpha(opacity=0)"})}b.addEvent(y,"change",function(F){var D=F.target,C,E=[],G;if(D.value){e("form_"+q).style.top=-1048575+"px";C=D.value.replace(/\\/g,"/");C=C.substring(C.length,C.lastIndexOf("/")+1);E.push(new b.File(q,C));if(!p.features.triggerDialog){b.removeAllEvents(B,p.id)}else{b.removeEvent(A,"click",p.id)}b.removeEvent(y,"change",p.id);v();if(E.length){f.trigger("FilesAdded",E)}}},p.id);B.appendChild(y);j.appendChild(B);p.refresh()}function u(){var i=a.createElement("div");i.innerHTML='<iframe id="'+p.id+'_iframe" name="'+p.id+'_iframe" src="'+h+':""" style="display:none"></iframe>';n=i.firstChild;j.appendChild(n);b.addEvent(n,"load",function(C){var D=C.target,B,y;if(!k){return}try{B=D.contentWindow.document||D.contentDocument||d.frames[D.id].document}catch(A){p.trigger("Error",{code:b.SECURITY_ERROR,message:b.translate("Security error."),file:k});return}y=B.body.innerHTML;if(y){k.status=b.DONE;k.loaded=1025;k.percent=100;p.trigger("UploadProgress",k);p.trigger("FileUploaded",k,{response:y})}},p.id)}if(p.settings.container){j=e(p.settings.container);if(b.getStyle(j,"position")==="static"){j.style.position="relative"}}p.bind("UploadFile",function(i,A){var B,y;if(A.status==b.DONE||A.status==b.FAILED||i.state==b.STOPPED){return}B=e("form_"+A.id);y=e("input_"+A.id);y.setAttribute("name",i.settings.file_data_name);B.setAttribute("action",i.settings.url);b.each(b.extend({name:A.target_name||A.name},i.settings.multipart_params),function(E,C){var D=a.createElement("input");b.extend(D,{type:"hidden",name:C,value:E});B.insertBefore(D,B.firstChild)});k=A;e("form_"+q).style.top=-1048575+"px";B.submit()});p.bind("FileUploaded",function(i){i.refresh()});p.bind("StateChanged",function(i){if(i.state==b.STARTED){u()}else{if(i.state==b.STOPPED){d.setTimeout(function(){b.removeEvent(n,"load",i.id);if(n.parentNode){n.parentNode.removeChild(n)}},0)}}b.each(i.files,function(A,y){if(A.status===b.DONE||A.status===b.FAILED){var B=e("form_"+A.id);if(B){B.parentNode.removeChild(B)}}})});p.bind("Refresh",function(y){var F,A,B,C,i,G,H,E,D;F=e(y.settings.browse_button);if(F){i=b.getPos(F,e(y.settings.container));G=b.getSize(F);H=e("form_"+q);E=e("input_"+q);b.extend(H.style,{top:i.y+"px",left:i.x+"px",width:G.w+"px",height:G.h+"px"});if(y.features.triggerDialog){if(b.getStyle(F,"position")==="static"){b.extend(F.style,{position:"relative"})}D=parseInt(F.style.zIndex,10);if(isNaN(D)){D=0}b.extend(F.style,{zIndex:D});b.extend(H.style,{zIndex:D-1})}B=y.settings.browse_button_hover;C=y.settings.browse_button_active;A=y.features.triggerDialog?F:H;if(B){b.addEvent(A,"mouseover",function(){b.addClass(F,B)},y.id);b.addEvent(A,"mouseout",function(){b.removeClass(F,B)},y.id)}if(C){b.addEvent(A,"mousedown",function(){b.addClass(F,C)},y.id);b.addEvent(a.body,"mouseup",function(){b.removeClass(F,C)},y.id)}}});f.bind("FilesRemoved",function(y,B){var A,C;for(A=0;A<B.length;A++){C=e("form_"+B[A].id);if(C){C.parentNode.removeChild(C)}}});f.bind("DisableBrowse",function(i,A){var y=a.getElementById("input_"+q);if(y){y.disabled=A}});f.bind("Destroy",function(i){var y,A,B,C={inputContainer:"form_"+q,inputFile:"input_"+q,browseButton:i.settings.browse_button};for(y in C){A=e(C[y]);if(A){b.removeAllEvents(A,i.id)}}b.removeAllEvents(a.body,i.id);b.each(z,function(E,D){B=e("form_"+E);if(B){j.removeChild(B)}})});v()});g({success:true})}})})(window,document,plupload);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Loading…
Reference in a new issue