Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
HTML5 file API + ajax file upload sample
JavaScript PHP
branch: master

This branch is 3 commits ahead of kyanny:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
public
.gitignore
README
me.jpg

README

HTML5 file API + ajax file upload sample

This is HTML5 file API + ajax file upload sample.

requires: PHP

How to run demo

1. git clone this repository
2. open Terminal.app and cd /path/to/git_clone_dir
3. start apache with mod_php
4. open http://localhost/public/index.html by Firefox
5. drag and drop me.jpg to box

When you dropped file, you can see dropped file in preview area, and file data will upload to server.

Thanks to:
http://github.com/kyanny/html5_file_api_ajax_upload_sample - this is original !!
http://ayuta.co.jp/html5-samples/ - very good HTML5 API sample codes. almost of this sample is copied from this page.
http://mattn.kaoriya.net/software/lang/javascript/20090223173609.htm - had me notice xhr.sendAsBinary.
http://blog.timc.idv.tw/posts/html5-file-api-xmlhttprequest-swfupload-now-what/ - showed me nice way to wrap jQuery.ajax using xhr.sendAsBinary.
Something went wrong with that request. Please try again.