forked from moxiecode/plupload
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved resize options into it's own object.
Added new custom upload examples and updated some of the old ones.
- Loading branch information
Showing
10 changed files
with
153 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<!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.queue.css" type="text/css" media="screen" /> | ||
<title>Plupload - Queue widget example</title> | ||
<style type="text/css"> | ||
body {background: #9A7C5F;} | ||
</style> | ||
<script type="text/javascript" src="http://www.google.com/jsapi"></script> | ||
<script type="text/javascript"> | ||
google.load("jquery", "1.3"); | ||
</script> | ||
<script type="text/javascript" src="../js/gears_init.js"></script> | ||
<script type="text/javascript" src="http://bp.yahooapis.com/2.4.21/browserplus-min.js"></script> | ||
<!-- Load source versions of the plupload script files --> | ||
<script type="text/javascript" src="../src/javascript/plupload.js"></script> | ||
<script type="text/javascript" src="../src/javascript/plupload.gears.js"></script> | ||
<script type="text/javascript" src="../src/javascript/plupload.silverlight.js"></script> | ||
<script type="text/javascript" src="../src/javascript/plupload.flash.js"></script> | ||
<script type="text/javascript" src="../src/javascript/plupload.browserplus.js"></script> | ||
<script type="text/javascript" src="../src/javascript/plupload.html5.js"></script> | ||
<script type="text/javascript" src="../src/javascript/jquery.plupload.queue.js"></script> | ||
<script type="text/javascript" src="http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js"></script> | ||
<script> | ||
// Custom example logic | ||
$().ready(function() { | ||
var uploader = new plupload.Uploader({ | ||
runtimes : 'gears,html5,flash,silverlight,browserplus', | ||
browse_button : 'pickfiles', | ||
max_file_size : '10mb', | ||
url : 'upload.php', | ||
resize : {width : 320, height : 240, quality : 90}, | ||
flash_swf_url : '/plupload/js/plupload.flash.swf', | ||
silverlight_xap_url : '/plupload/js/plupload.silverlight.xap', | ||
filters : [ | ||
{title : "Image files", extensions : "jpg,gif,png"}, | ||
{title : "Zip files", extensions : "zip"} | ||
] | ||
}); | ||
|
||
uploader.bind('Init', function(up, params) { | ||
$('#filelist').html("<div>Current runtime: " + params.runtime + "</div>"); | ||
}); | ||
|
||
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>'); | ||
}); | ||
}); | ||
|
||
uploader.bind('UploadProgress', function(up, file) { | ||
$('#' + file.id + " b").html(file.percent + "%"); | ||
}); | ||
|
||
$('#uploadfiles').click(function(e) { | ||
uploader.start(); | ||
e.preventDefault(); | ||
}); | ||
|
||
uploader.init(); | ||
}); | ||
</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>Custom example</h1> | ||
|
||
<p>Shows you how to use the core plupload API.</p> | ||
|
||
<div> | ||
<div id="filelist">No runtime found.</div> | ||
<br /> | ||
<a id="pickfiles" href="#">[Select files]</a> | ||
<a id="uploadfiles" href="#">[Upload files]</a> | ||
</div> | ||
</form> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.