Multiple file upload in Codeigniter with example

Multiple file upload in Codeigniter with example

In this post we will show you Multiple file upload in Codeigniter with example, hear for Multiple file upload in Codeigniter with example we will give you demo and example for implement.

how to Multiple file upload in Codeigniter with example and demo

Codeigniter doesn’t have a help for transfer various records without a moment’s delay; they saw it was out of structure rationality, and in light of the fact that we don’t have room schedule-wise to contend about this, we simply make it by hands.

Html5 and jQuery give you the capacity to transfer different records, not only that, additionally to make it simple for client to control transferring documents expansions by approving before transfer.

Note: you should make your server approval to make certain on the grounds that customer approval is insufficient.

Read More DownloadIn this post we will learn how to Multiple file upload in Codeigniter with example ::

1 # Using another improved Codeigniter file upload library

We should acquire and hack Codeigniter record transfer library to give it the capacity to transfer various documents with single info, despite the fact that we can do this undertaking with no other library yet for code clean and to evade reiterations I prescribed to utilize this library

This library doesn’t transform anything to compose your code, so on the off chance that you have as of now assemble your venture with consistent codeigniter document transfer library you won’t need to change the first transferring code, this library will distinguish single or multi transfer, your swing to deal with embeddings records data to your table;

2 # Using jQuery MultiFile Plugin

This light Wight jQuery Plugin causes you to effortlessly choose different records for transfer. It gives you a chance to do some fundamental approvals previously documents transferred, in light of their expansion or size, I utilize it to make basic Codeigniter transfer record case with no intricate highlights

To choose numerous documents without a moment’s delay you ought to characterize a few traits, other discretionary Use HTML5’s different quality

class=”multi” to active the plugin and class=”with-preview”

maxlength=”10″ Limit: 10 files

accept=”gif|jpg|png Allowed extensions: gif, jpg, png.

data-maxfile=”1024″ Allowed files sizes (under <1MB each) or data-maxfile=”1024″ Allowed files sizes (under <1MB in total) type=”file” to define input type

  class="multi with-preview"

name=”files[]” Important if you want to make it multi upload input to add [], these will define input as multidimensional array as example to see array like this

    [0] => Array
            [name] => test1.txt
            [type] => text/plain
            [tmp_name] => /tmp/phpYasrkD
            [error] => 0
            [size] => 589

    [1] => Array
            [name] => test2.txt
            [type] => text/plain
            [tmp_name] => /tmp/phpeEoFDG
            [error] => 0
            [size] => 558

enctype=”multipart/form-data” .. It is an encoding type that allows files to be sent through a POST. And without this encoding the files cannot be sent through POST.

If you want to upload a file via a form, you must use this attribute in the form. For full documentation you can see this page.

Read More Download

Hope this code and post will helped you for implement Multiple file upload in Codeigniter with example. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve onlincode. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

Leave a Comment

Your email address will not be published. Required fields are marked *

  +  44  =  50

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US