简体   繁体   中英

Does method writeFile work in IE8?

I am writing Dropbox web-application and use Client Library for the Dropbox: https://github.com/dropbox/dropbox-js . For uploading file choosen by user I use method writeFile. Html object File(< input type=file >) is passed as parameter data. It works fine in FireFox. It is said that this library is tested against IE9 and IE10.

Does method writeFile work in IE8?

If it does not work in IE8 then is there way to use html form for uploading file to dropbox?

Dropbox docs does not give example how to upload file by html form. Is there some example?

writeFile takes the contents of the file, not an HTML input tag. See http://coffeedoc.info/github/dropbox/dropbox-js/master/classes/Dropbox/Client.html#writeFile-instance .

This means your JavaScript has to have access to the actual contents of the file to use writeFile . The HTML5 File API might help here, but it certainly doesn't work in IE8.

I think this means you'll need to upload the file to your own servers (via a standard form submit) and then transfer the file from there to Dropbox.

EDIT : Remove a clause claiming general poor support for File API. It looks like it's not that bad: http://caniuse.com/#search=file%20api

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM