#Edge.js is a pain-free piece of JavaScript allowing you to add file uploads to your site. It is developed to replace any other recent file uploaders and can easily substitute most of your current implementations with just a few lines of code.
It supports auto-upload, form-driven upload, type-checking, cross-browser functionality and a bunch of other features.
Edge.js is currently built on a basis of JQuery and JQuery UI. Pleas note: Edge.js is not a JQuery Plugin as I want to leave the option to use another framework that supports similar selectors.
##Documentation Well, you are currently looking at it. If you're at the GitHub site right now, go into dist/docs/index.html to find the full-fledged documentation.
If you just want to know how to put it on your site then take a look at the Edge.create(..)
function.
If you want to get deep into detail (wow, you're a geek) click your way through Edge.FileUploader
.
##Examples
HTML
<div id="uploader"></div>
JS
<script>
Edge.create({
receiver: '#uploader',
fileName: 'file',
multiUpload: true,
processors: {
//any type of callback functions go here
}
});
</script>
Server
Your server needs to tell the Uploader which Files have been uploaded so that syncing between Frontend and Backend works like a charm. Every Serverrequest will send domUploadIds
as variable to the server.
Any response must be in the format
`{success: [boolean], files: [{'domUploadId'=>'uploadidgiven_1'},{'domUploadId'=>'uploadidgiven_2'}]}`