Closed toolmantim closed 9 years ago
So imgcat.sh and the iTerm standard expect the filename to be base64 encoded: http://iterm2.com/images.html#/section/home
imgcat.sh
$ ./utils/imgcat.sh fixtures/meme.png | less ESC]1337;File=name=Zml4dHVyZXMvbWVtZS5wbmc=;size=55110;...
But it seems we expect it to be plain text:
$ ./utils/imgcat.sh fixtures/meme.png | terminal-to-html *** Error parsing iTerm2 image escape sequence: can't determine content type for "Zml4dHVyZXMvbWVtZS5wbmc=&q
https://github.com/buildkite/terminal/blob/0f479d49667660a99390bfb7a601f50a4e36fe0f/image.go#L44
I believe all we need to do base64 decode the name field value before we set it.
Ah, dammit. I was sure I tested it with imgcat.sh. Ah well.
So
imgcat.sh
and the iTerm standard expect the filename to be base64 encoded: http://iterm2.com/images.html#/section/homeBut it seems we expect it to be plain text:
https://github.com/buildkite/terminal/blob/0f479d49667660a99390bfb7a601f50a4e36fe0f/image.go#L44
I believe all we need to do base64 decode the name field value before we set it.