# \[SOLVED\]Using File-saver.js with Ember-cli

**URL:** <https://discuss.emberjs.com/t/solved-using-file-saver-js-with-ember-cli/7457>\
**Category:** Ember CLI\
**Created:** [March 7, 2015, 3:18am UTC](https://discuss.emberjs.com/t/solved-using-file-saver-js-with-ember-cli/7457 "2015-03-07T03:18:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kolybasov](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/kolybasov/32/9787_2.png) [@kolybasov](https://discuss.emberjs.com/u/kolybasov)\
**Post date:** [March 7, 2015, 3:18am UTC](https://discuss.emberjs.com/t/solved-using-file-saver-js-with-ember-cli/7457/1 "2015-03-07T03:18:38Z")

</div>

Hi, all! I would like to use [FileSaver.js](https://github.com/eligrey/FileSaver.js) with my ember-cli project for saving Canvas to PNG.

I download [Blob.js](https://github.com/eligrey/Blob.js), [canvas-toBlob.js](https://github.com/eligrey/canvas-toBlob.js) and FileSaver.js then import it in Brocfile.js

```
app.import('vendor/Blob.js');
app.import('vendor/canvas-toBlob.js');
app.import('vendor/FileSaver.min.js');

```

In my controller I save canvas by this way:

```
$('.canvas')[0].toBlob (blob) =>
      saveAs blob, "#{fullName}_ID_Badge.png".underscore()

```

It’s fully working with Chrome and Firefox, but IE still not working. Always show:

```
SCRIPT5022: SecurityError

```

I have tried to import FileSaver like this:

```
app.import('vendor/FileSaver.min.js', {
      'file-saver': ['saveAs']
});

```

But when I tried in controller

```
`import saveAs from 'file-saver'`

```

they sad me “Module file-saver could not found”

Is there any solutions to save canvas in IE without server-side processing?

`UPD. SOLVED: IE cannot save canvas if you draw SVG. It was not problem of Ember or FileSaver.js`

---

<div class="post-metadata">

**Author:** ![alexspeller](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/alexspeller/32/14812_2.png) [@alexspeller](https://discuss.emberjs.com/u/alexspeller)\
**Post date:** [March 7, 2015, 6:36am UTC](https://discuss.emberjs.com/t/solved-using-file-saver-js-with-ember-cli/7457/2 "2015-03-07T06:36:23Z")

</div>

This sounds more like an IE issue with file saver than an ember issue. Have you tried filing an issue on that project?

---

<div class="post-metadata">

**Author:** ![kolybasov](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/kolybasov/32/9787_2.png) [@kolybasov](https://discuss.emberjs.com/u/kolybasov)\
**Post date:** [March 7, 2015, 10:09am UTC](https://discuss.emberjs.com/t/solved-using-file-saver-js-with-ember-cli/7457/3 "2015-03-07T10:09:48Z")

</div>

File-saver supports IE10+, but I think some of this libraries was imported wrong to my project. UPD. Demo working in IE [FileSaver.js demo](http://eligrey.com/demos/FileSaver.js/)
