# How to use FileSystem.writeFile() with binary data on iOS?

**URL:** <https://forum.ionicframework.com/t/how-to-use-filesystem-writefile-with-binary-data-on-ios/241930>\
**Category:** Capacitor\
**Created:** [May 22, 2024, 2:43pm UTC](https://forum.ionicframework.com/t/how-to-use-filesystem-writefile-with-binary-data-on-ios/241930 "2024-05-22T14:43:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://forum.ionicframework.com/u/bluepuma77)\
**Post date:** [May 22, 2024, 2:43pm UTC](https://forum.ionicframework.com/t/how-to-use-filesystem-writefile-with-binary-data-on-ios/241930/1 "2024-05-22T14:43:17Z")

</div>

How to use FileSystem.writeFile() with binary data? The [doc states](https://capacitorjs.com/docs/apis/filesystem#writefile) that `data` can only be a “String” on iOS. But I want to download binary data like an image and store it on the filesystem. Is that possible?

---

<div class="post-metadata">

**Author:** ![robingenz](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/robingenz/32/144137_2.png) [@robingenz](https://forum.ionicframework.com/u/robingenz)\
**Post date:** [May 22, 2024, 3:54pm UTC](https://forum.ionicframework.com/t/how-to-use-filesystem-writefile-with-binary-data-on-ios/241930/2 "2024-05-22T15:54:48Z")

</div>

You can find an example in this guide: [The File Handling Guide for Capacitor - Capawesome](https://capawesome.io/blog/the-file-handling-guide-for-capacitor/#write-a-file)
