Skip to main content

Jeremy Cherfas

TFW when you realise it has been way too long since you did the human cron job thing.

Jeremy Cherfas

It says here https://indieweb.org that "The IndieWeb is a people-focused alternative to the 'corporate web'", but that's just a start and of course there is more to it than that. More a state of mind than a thing, I'd say.

Jeremy Cherfas

Finished reading: Trieste and the Meaning of Nowhere by Jan Morris, ISBN: 9780571204687

Jeremy Cherfas

Quick reminder that a 3-hour [virtual Homebrew Website Club](https://indieweb.org/events/2018-06-13-homebrew-website-club) will be starting in about 22 minutes. We use [Mumble](https://indieweb.org/Mumble) to chat about anything and everything . See you there.

Jeremy Cherfas

Great explanation and interesting change, though I personally don't like such a dark background. One thing I noticed, the blue of the date-as-permalink in comments is really intense, to the point of distraction. For me.

Jeremy Cherfas

A little problem with Known's Micropub endpoint

3 min read

One of the developers of Sunlit, a photo-sharing app that is part of the Micro.blog ecosystem, contacted me to say that “the images on your site have a MIME type of application/data”. I’d like to say I understood immediately what the problem was and what it meant, but I had to do some learning first. It wasn’t as simple as the extension, the bit after the filename that indicates whether it is a JPEG or PNG kind of image. Rather, it was about what my server tells your browser about the image.

To backtrack, Known stores all files as blobs that contain the actual file data, the 1s and 0s. Your browser, when it receives a post from my server, can often sniff out what kind of thing (image, audio, text etc) that blob of data represents and do a good job of showing it to you. Normally, you wouldn’t even notice. One clue is that if you right-click on an image, and ask to open it in a new tab, it actually gets downloaded instead, I suppose because the new tab doesn’t know what else to do with it.

Anyway, I confirmed that the source file for most images did not have an extension (which would have told the browser directly how to deal with it). Most, but not all. Files I had uploaded to my site directly did have an extension and the correct MIME type. The “bad” files had come from OwnYourGram or Quill, both of which are part of the joyful . They use a standard called Micropub to send things to a suitably equipped website.

It seemed unlikely that both Quill and OYG would fail to send the requisite information to identify a photo, so I went digging into the code that Known uses to decide what to do with a post sent by Micropub. I made a bit of progress but although I could see more or less what was happening, I couldn’t see how to make it right.

Fortunately Aaron Parecki, who built Quill and OwnYourGram (and so much else), was around and gave me the clue I needed to investigate: curl -I example.com/file.

One beautiful feature of Quill is that if it is sending a photo and if the receiving site has a media endpoint for receiving files (which Known does) it uploads the file, shows you a preview and tells you the location of the file. With that, the curl command shows that the temporary file has the correct description of Content-Type: image/jpeg. Once Known has processed the whole post from Quill, though, the file that contains the image shows as Content-Type: application/data.

Somewhere between receiving the temporary file from Quill and storing it permanently, Known fails to give it the proper MIME type.

I wish I knew enough to discover where the problem lies. Most likely Marcus Povey – who keeps the wheels spinning at Known – will be able to do the needful, now that I have submitted an issue. And Sunlit will be able to share my photos far and wide.

Jeremy Cherfas

2018-06-11

1 min read

It's all about power. Where the Dublin Gastronomy Symposium leads, the Oxford Symposium on Food and Cooking and the Agricultural History Society follow.

Jeremy Cherfas

Very happy to report that exist.io now includes browsing past calendar months.

Jeremy Cherfas

Excellent news; thanks. Now to find all those hard-coded class names ...

Jeremy Cherfas

I feed @WithKnown into micro.blog and POSSE to Twitter just fine. Known also makes it easy to feed micro.blog only certain kinds of post because the RSS is easy to adapt.