# File not supported on Windows only

**URL:** <https://discuss.ipfs.tech/t/file-not-supported-on-windows-only/3161>\
**Category:** Help\
**Created:** [June 8, 2018, 1:57pm UTC](https://discuss.ipfs.tech/t/file-not-supported-on-windows-only/3161 "2018-06-08T13:57:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![druige015](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@druige015](https://discuss.ipfs.tech/u/druige015)\
**Post date:** [June 8, 2018, 1:57pm UTC](https://discuss.ipfs.tech/t/file-not-supported-on-windows-only/3161/1 "2018-06-08T13:57:33Z")

</div>

Hi all,

Current situation:

```
ipfs add image1.jpg

```

This works well as expected.

```
ipfs get Qm....

```

On Ubuntu, i get my file as expected, and the image opens without issues.  
However, on Windows, i get ‘this file is not supported’ error.

I’ve tried with piping into a jpg, jpeg, png, everything, but the problem remains.

Google did not provide me with any assistance, i hope you guys (and girls) can ^^

Thx!

---

<div class="post-metadata">

**Author:** ![stebalien](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/stebalien/32/156_2.png) [@stebalien](https://discuss.ipfs.tech/u/stebalien)\
**Post date:** [June 9, 2018, 5:33am UTC](https://discuss.ipfs.tech/t/file-not-supported-on-windows-only/3161/2 "2018-06-09T05:33:21Z")

</div>

What’s the _exact_ error you’re seeing and where are you seeing it (a screenshot of the Windows console would be helpful).

---

<div class="post-metadata">

**Author:** ![druige015](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@druige015](https://discuss.ipfs.tech/u/druige015)\
**Post date:** [June 12, 2018, 3:59pm UTC](https://discuss.ipfs.tech/t/file-not-supported-on-windows-only/3161/3 "2018-06-12T15:59:07Z")

</div>

There is no error. It fetches the file without any issue.

Here’s a screenshot of the output, together with the files on Windows Explorer

 ![](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/2X/2/2257b3472ab46049a8f8a542518a07dd9c464536.png)

If i manually append the Qm… file with \*.jpg, the image renders as it should.

As reminder, i don’t have this issue on Ubuntu running in VM.  
If i wrap the images in a folder, and retrieve the folder, i don’t have this issue neither.

---

<div class="post-metadata">

**Author:** ![CocoonCrash](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/cocooncrash/32/1362_2.png) [@CocoonCrash](https://discuss.ipfs.tech/u/CocoonCrash)\
**Post date:** [June 12, 2018, 5:01pm UTC](https://discuss.ipfs.tech/t/file-not-supported-on-windows-only/3161/4 "2018-06-12T17:01:49Z")

</div>

If it fetches the file without any issue I don’t understand what’s the problem.? Are you trying to say that your original file is corrupted after adding it and then getting it back from IPFS ?

---

<div class="post-metadata">

**Author:** ![stebalien](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/stebalien/32/156_2.png) [@stebalien](https://discuss.ipfs.tech/u/stebalien)\
**Post date:** [June 13, 2018, 12:20am UTC](https://discuss.ipfs.tech/t/file-not-supported-on-windows-only/3161/5 "2018-06-13T00:20:51Z")

</div>

Unless you add the file with the `-w` flag to “wrap” the file in a directory, ipfs will forget the filename on add. So, when you call `ipfs get Qm....`, IPFS will use the `Qm....` as the filename. Unfortunately, Windows relies on file extensions to pick the right handler for the file. As `Qm...` doesn’t specify an extension, Windows has no idea how to handle this situation.

Try adding the file with `ipfs add -w image1.jpg`. When you fetch the corresponding hash with `ipfs get`, you’ll get a _directory_ (folder) containing a file named `image1.jpg`.

---

<div class="post-metadata">

**Author:** ![druige015](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@druige015](https://discuss.ipfs.tech/u/druige015)\
**Post date:** [June 13, 2018, 7:21pm UTC](https://discuss.ipfs.tech/t/file-not-supported-on-windows-only/3161/6 "2018-06-13T19:21:22Z")

</div>

Perfect, that does the trick!

```
ipfs add -w

```

Thank you!
