edgarjs / prototype-nginx-upload-progress

Plugin to manage the nginx upload progress module with Prototype

This URL has Read+Write access

zapnap (author)
Fri Feb 27 10:52:17 -0800 2009
edgarjs (committer)
Fri Feb 27 16:54:23 -0800 2009
name age message
file .gitignore Fri Feb 20 13:19:02 -0800 2009 first commit [edgarjs]
file README.textile Fri Feb 27 16:54:22 -0800 2009 hide progress div until submit action fired Si... [zapnap]
directory lib/ Fri Feb 27 16:54:23 -0800 2009 parameters unnecessary Signed-off-by: Edgar J.... [zapnap]
README.textile

Upload Progress for Prototype

For use with the Nginx upload progress module or the Apache upload progress module.

http://wiki.codemongers.com/NginxHttpUploadProgressModule http://github.com/drogus/apache-upload-progress-module

Example:


	<style type="text/css">
	#progress {
	    width: 300px;
	    background: #eee;
			border: 1px solid #222;
	}
	#progressbar {
	width: 0px;
	height: 24px;
	background: #333;
	}
	</style>

	<script type="text/javascript">
	document.observe('dom:loaded', function() {
		$('upload').uploadProgress();
	});
	</script>

	<form action="/some_action" enctype="multipart/form-data" id="upload" method="post">
		<input id="myFile" name="myFile" type="file" />
		<input type="submit" value="Upload!" />
	</form>
	<div id="progress" style="display: none;">
		<div id="progressbar">&nbsp;</div>
	</div>

You can pass some options to the uploadProgess() call.
$('upload').uploadProgress({interval: 5});

Port by Edgar J. Suárez – http://mimbles.net
Modified by Nick Plante – http://blog.zerosum.org
Based on the jQuery plugin: http://blog.new-bamboo.co.uk/assets/2007/11/23/jquery.nginxUploadProgress.js