Reputation: 2000
I want to make my own image uploader, that supports drag and drop, jQuery AJAX functions to send necessary data to php file. I have a hard time getting started with it, since there are many solutions, but most of them are not-explained plugins, but i wanna make one by my own, to modify it and understand how it works. Any tips, where should i start in order to achieve the goal?
Upvotes: 0
Views: 2944
Reputation: 4084
PLUpload is my preference. Sleek, easy to customize, open source and supports all major technologies from HTML4 to HTML5 to Flash to Silverlight, dependent on your end users configuration
Upvotes: 1
Reputation: 13557
You'll be limiting yourself to modern Browsers (unless you provide a reasonable fallback). What you're looking for is the FileAPI. With that you can't iterate through directories, though. The File System API exists, but isn't supported widely, yet. SWF upload is flash based solution (I've used numerous times).
You may also want to have a look at Resumable.js. It's doing a nice job of splitting uploads into chunks. This way you can pause/resume uploads, handle really large files, etc.
Upvotes: 2
Reputation: 3323
First of all, file upload through AJAX is not possible. It's an workaround that uses a hidden iframe as the target of the form. Then capture the iframe's content and do whatever you need. Here's an tutorial you can adapt to your needs.
Upvotes: 1
Reputation: 146
Uploadify is a good way to start what you are trying to achieve.. It uses jquery ajax and php to upload the images.. You can add multiple images as well and it comes with very good documentation. And its really easy to implement & understand. I would suggest you to study how this plugin works in order to achieve what your are trying to do.
Upvotes: 0