This page tests possible ways of copying file data between a web page and a local system without server interaction. This is part of HTML5 revolution.
read
Read local file using File API. [File API (draft)] Latest draft specifies FileReader object. [FileReader MDC] Earlier Firefoxes support reading file directly. [File MDC]
Works on Firefox 3+, soon in Chrome.
Show open dialog from javascript:
Firefox does not support click() method on input[type=file]
[Mozilla bug 36619], nor label for click routing
(they call it insecure, but don't understand why).
Same in Opera. Well known opacity:0 hack must be used:
[quirksmode.org, Styling an input type="file"]
write
There is draft that defines FileWriter [File API: Writer (draft)] but it is not supported yet.
Currently Data URI [RFC 2397] can be used to save a file: Save hello.zip.
Problem 1: No way to specify filename.
Problem 2: No way to force saving. View is the default.
Doesn't work in Chrome.
Can be initiated from javascript by assigning location.href property:
drop
Dragging file to the page. [whatwg.org, HTML5, Drag and Drop]Works on Firefox 3.5
No browser supports dragging file from a page, AFAIK.
✻ ✻ ✻
Your browser:
~jb