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
.
2 Likes
Perfect, that does the trick!
ipfs add -w
Thank you!