Welcome Guest, Not a member yet? Register   Sign In
uploading and preview image with ajax
#4

[eluser]Unknown[/eluser]
Notice this line in that code ?
Code:
request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
File uploading in requires Content-Type to be multipart/form-data.
As far as I know, XMLHttpRequest currently doesn't support multipart/form-data.

But you can still Ajaxify your file uploader by setting target attribute of your uploader form to some hidden iframe. Go to some search engine and search for "Ajax file uploader". You will get lot of examples in PHP.
Once you have understood how it works it will be very easy for you to do it in Code Igniter.


Messages In This Thread
uploading and preview image with ajax - by El Forum - 05-29-2008, 10:02 AM
uploading and preview image with ajax - by El Forum - 08-31-2009, 04:21 AM
uploading and preview image with ajax - by El Forum - 01-08-2010, 12:28 AM
uploading and preview image with ajax - by El Forum - 07-23-2011, 02:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB