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!
Whatâs the exact error youâre seeing and where are you seeing it (a screenshot of the Windows console would be helpful).
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
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.
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 ?
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.
Perfect, that does the trick!
ipfs add -w
Thank you!