Bom, algo animador para quem curte javascript e suas facilidades.
Firefox 3 inplementou upload de arquivos por ajax, sim, isso mesmo, UPLOAD DE ARQUIVOS USANDO AJAX! Maravilha não?!
pode-se utilizar os atributos:
filesize e filename ( que não precisa explicar o que são!)e os métodos:
getAsBinary(none) = "Returns a
DOMString
containing the file's data in raw binary format. ";getAsDataURL(none) = "Returns a
DOMString
containing a data:
URL that encodes the entire contents of the referenced file. ";getAsText(encoding) = "Returns the file's contents as a
DOMString
in which the file's data is interpreted as text using a given encoding. "; //utf-8 por padrãoPara saber mais: nsIDOMFile e soaked and soaped (com implementação usando a prototype.js);
Acha útil? ... e muito!
update: SÓ no firefox 3 por enquanto...rs!
Abraços!
Nenhum comentário:
Postar um comentário