A while back, Paul Gregoire introduced me to the jQuery JavaScript library. It didn’t take long for me to realize the power and elegance of this library. For the longest time, I’ve been wanting to take a shot at authoring a plugin for jQuery and I’ve finally gotten around to it. So, it is my pleasure to announce the creation of the jquery.transmit plugin. It is a flash-backed multiple file upload utility with a user experience similar to that of Flickr’s current uploader. The goals for the plugin were simple: Provide an easy-to-use interface, use flash to work around HTML and JavaScript based file upload issues, and wire it all together with jQuery. Getting started with the plugin is quite simple. Import the necessary CSS and JavaScript dependencies, edit the supplied HTML to your liking and invoke the plugin like so:
$(document).ready(function() {
$('#transmit').transmit('http://mysite.com/upload/');
});
While the plugin is still very much in its infancy and should be considered a work in progress, it is my opinion that it is easier to shake out bugs using an iterative development process. So, keeping that in mind, I’m hoping that a couple of you brave souls will wander over to googlecode and give it a try. Constructive feedback is very much appreciated.






8 Comments
Just downloaded your file upload solution - very nice! What is the name of the image array that is submitted?
Also, it would be nice to have a way to limit the number of files a user can upload.
@Jason:
Thanks for the suggestions. The name of the image data variable is “Filedata”. I’ll look into adding the file number limit later this week.
I’m getting a 2038 error on uploading the files, the upload completes, but it the file never appears in the set location, the target folder is set to 777, any ideas?
Thanks
@Jason:
My first guess is that your server-side script cannot handle the size or number of files you are attempting to load. You can configure the max file size for the uploader and I am working to add functionality to limit the number of files to be uploaded.
Greetings,
the script appears to be uploading fine, but I have no idea where it is sending the file or what is happening. I have no way to monitor the uploaders actions
@Kevin:
If you run the plugin in Firefox with the Firebug extension, you’ll see debug statements from the upload SWF itself. That should give you an idea of what is going on behind the scenes.
HELLO, I and my programmer are trying to use your uploader but are getting errors… the current one is that when we click on upload the dialog doesn’t pop up… firebug says: empty string passed to getElementById()… any thoughts?
thanks!
I’m having issues getting this to work in IE. Currently, I’m testing in IE7 and getting an error that will not allow me to even select files to upload. The error I am getting is:
Line: 49
Char: 5
Error: Unspecified Error (gotta love IE)
Code: 0
I get the same line and char no matter which page this run from so I’m guessing it’s something in the jquery.transmit.js file. Any thoughts? Seems to work fine in FF/mac, FF/windows, and Safari.