Local image in canvas in chrome
chrome's access to local files are restricted, but I would like to draw an image on a canvas: an image selected with a file input and without s开发者_如何转开发ending the image to the server and then requesting it back.
Some help would be great!
Since your using Google Chrome, file:// URIs cannot read other file:// URIs. If you are using this for development, then you can add the following command line switch to chrome:
--allow-file-access-from-files
HTML5 has (currently in development) FileSystem API you can read an example from it here: http://www.html5rocks.com/tutorials/file/filesystem/
If your file is not on the local domain, see this answer.
精彩评论