Implementing ajax file upload with anoFile is easy but a bit different compared to using standard jQuery Plugins.
There are a few essential actions that need to be done in order to implemenent the plugin correctly.
Once called, the plugin will create a file input and append it in a specified container element (HTML). The container must be located within a form with enctype parameter set to multipart/form-data and action set to the file that handles the server side upload
<form method="post" action="index.php" enctype="multipart/form-data" data-upload="upload.php"></form>
Once this form is provided we can then attach the upload input to any element inside the form.
Pay attention to data-upload parameter. The AJAX upload will use the path in this attribute for server side file upload.
A working example can be found in the online demo.
The most useful part of the script are it's callback functions: before() and success(). They can be used to show a preload image or receive the list of all the uploaded files and do extra action if needs be.
before(event) | Callback Function that is called prior to file upload |
success(event, ui) |
Callback Parmeters event - Event |
Please find below a link to downloadable Zip file.
Please use the following form to report an issue/bug you've found in anoFile - Lightweight jQuery Ajax File Upload. We will review the reported issue and get in touch with you as soon as possible.
* Note:Your email and personal information WILL NOT be used for any other purpose except for posting back bug related information.
If you like this tool, share it with your friends
Anowave is an extension developer for Magento 1.x and Magento 2.x platforms. We provide a wide range of premium extensions for our in-house and public clients. The extensions we offer extend the capabilities of Magento and provide bespoke functionality. They also fill some gaps in the functionality provided by the base platform and help customers choose Magento as their preferred eCommerce platform.
The extensions we offer are part of our full-range Magento service, which also includes a Premium Helpdesk where customers can speak with actual software engineers and have their issues resolved without hassle. Premium-labeled modules also include free installation, configuration, testing, etc.