CodeIgniter Forums

Full Version: AJAX file upload without page refresh
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

I have been developing for some time on CI but I have been working on getting a proper file upload working on my page with no success.

I know CI has file upload functionality built into it but from what I really want is some sort of ajax upload functionality where I can upload the file and it appears in a html table as uploaded. My ultimate goal is to upload the file, read it into bytes and store it as a blob in my mysql database.

I have been scouring the internet for help but most examples either user a form submit (which I can not do because the page can not be refreshed) or they use a plugin like AjaxUpload which I also can not get to seem to work.

Does anyone have a good example on how to do this? A good tutorial? It seems like I am making this much harder than it should be. I just want a browse button, and a way to point to the file and read it into bytes to store as a blob in my DB. Thanks for any help,