JavaScript Tutorials: AJAX File Upload with Progress Indicator (Part 1/5)




Want more? Explore the library at https://www.codecourse.com/lessons

Official site
https://www.codecourse.com

Twitter


Original source


39 responses to “JavaScript Tutorials: AJAX File Upload with Progress Indicator (Part 1/5)”

  1. I bought the source code from the phpacademy website. I tried it and it still didn't work for me… you can read the details of this video and it has a link that will can take you to the webpage where you can purchase the source code. Good luck

  2. Hi the code is not working for me. I even downloaded your code. No luck. I am on a godaddy vps server. Could it be my php version. I have the latest version of chrome. It uploads the files but I do not see any progress percentage displayed into the upload_progress div.

  3. it's not ajax. At least this video is not. When you press submit the page Reloads. You can even see that the input field where you select files refreshes. If there were any other forms on the page containing user input they would be cleared aswell. It's just usual file upload

  4. I haven't seen the other videos form the series, but right off the bat i notice a security issue when you are using move_uploaded_file(). You type "files/{$name}", if i named my file something like "../001.jpg" it would be uploaded in the main folder and not in the files folder. To prevent this use the basename() function:

    sprintf('files/%s', basename($name))

  5. 02:06, like he said internet explorer is no go, it does not work in IE because of the HTML5 File API is not implemented in IE 9. Meaning, this is useless for now if this is a public site that is used by multiple unknown users. Of course, who to blame? Microsoft. Instead I would use iframe trick to upload by AJAX, if it's a intranet application or your site is disabled for IE users I would defiantly use the HTML5 File API.

Leave a Reply