File errors when d/l using browser but none using cmd line

Hello,
I’ve just started going through the quickstart tutorial and wrapping my head around head around how to use ipfs.

I’m having problems with accessing a file after it’s been uploaded
The file is monkey.jpg at this location:
https://ipfs.io/ipfs/QmPdDcp6aKcRM6izGTQQsDSxy7Wd63DnEFcwUJSd9aSV2f

if I attempt to download it through the browser i get a message that it “cannot be displayed because it conatins errors.”
If I download the file through command line “ipfs cat QmPdDcp6aKcRM6izGTQQsDSxy7Wd63DnEFcwUJSd9aSV2f/monkey.jpg >monkey2.jpg”
The downloaded image is fine.

What am I doing wrong?

everything youre doing seems right, except that the file is NOT a jpeg. It looks more like a RAW image.

If you want to start with a PNG or JPG, I have converted it for you here:
https://ipfs.works/ipfs/QmWkGgzA6eJTQUnkbzsDZDD7j2fnAQqd9a7gw7BgGLHb1a/monkey.png
https://ipfs.works/ipfs/QmTJpHuzGeN6vpayXXBeEx149xeTaJEQs6UcRcseAKfCB7/monkey.jpg

1 Like

Thank you, I thought that might be the case but windows didn’t complained if files were improperly named.

Ah yes, I’ve had that problem before too. My solution was to get rid of windows.
Good luck!

3 Likes

Probably depends on what browser you are using. Tried visiting this URL: https://ipfs.io/ipfs/QmPdDcp6aKcRM6izGTQQsDSxy7Wd63DnEFcwUJSd9aSV2f/monkey.jpg in three browsers, Safari, Chrome and FirefoxNightly

Safari: Works
Chrome: Black page
Firefox: “Cannot be displayed because it contains errors”

And https://ipfs.works/ipfs/QmTJpHuzGeN6vpayXXBeEx149xeTaJEQs6UcRcseAKfCB7/monkey.jpg works in all three browsers.