| Summary: | Add support to download/render non-textual/image files. | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | libing wang <libingw> |
| Component: | Client | Assignee: | libing wang <libingw> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Mike_Wilson, simon_kaegi |
| Version: | 5.0 | ||
| Target Milestone: | 6.0 M2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
libing wang
pushed the support in with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=7afffefeaed607654621eff126ba81048de6cc60. Currently Safari does not support HTML5 anchor download attribute. But Chrome and Firefox work well. I am turning the "Treat the unrecognized file type as binary" flag off now so it will not render the download link. As the Orion file system API does not have an interface of "raw file URL", the only thing we can do is to ask the browser to render/download a blob URL. Good news: Both Chrome and FireFox can render some mime types or download unknown binary files. IE 10, at least supports a native API called saveBlob(blob, fileName). Bad news: Safari is able to support blob URL to some extent(e.g. png and pdf), but not for its unknown types like zip or war files. When Safari opens such blob URLs, it just throw errors. Found some interesting articles regarding the Safari blob URL support. 1). Check if Safari support blob URL https://github.com/ssorallen/blob-feature-check 2). A thread talking about Safari's bad support for Blob URL. The comments around the bottom is quite new. https://github.com/eligrey/FileSaver.js/issues/12 |