#known 2018-06-12
2018-06-12 UTC
[cleverdevil], [chrisaldrich], tantek, mapkyca and [jgmac1106] joined the channel
# mapkyca jeremycherfas: Got an example of this happening? Known will use the mime type of the original image, so either the original file was mis-detected on upload (prob because your server mime types aren't configured or the mime type hint library isn't installed), or headers are being squished on download
jeremych_ joined the channel
# jeremycherfas Let me check. It definitely happens with images from OwnYourGram, like this one https://stream.jeremycherfas.net/2018/result
# jeremycherfas Let me see if I have one uploaded directly
# jeremycherfas Allso true with other images via Micropub, eg https://stream.jeremycherfas.net/2018/untitled-13
# jeremycherfas But not, apparently, with images uploaded directly to Known, e.g. https://stream.jeremycherfas.net/2018/breadhead
# jeremycherfas Seems that when they come from somewhere else, image files do not get an extension, but when I upload them direct to Known, they do.
[kevinmarks] joined the channel
# [kevinmarks] so mime type is not coming through in micropub? Both multipart and media endpoint should be sending it
# jeremycherfas I guess not. I need to go and check my setting in Quill (and OYG?) to see if that is an option I have overlooked. But not for an hour or so.
# jeremycherfas Seems odd. Maybe Known's micropub is stripping it.
[pfefferle] and [cjwillcock] joined the channel
# jeremycherfas I'm looking here https://github.com/idno/Known/blob/master/IdnoPlugins/IndiePub/Pages/MicroPub/Endpoint.php#L122 but 'type' seems to refer to the type of post, not the type of file.
# jeremycherfas Nope. More likely to be here https://github.com/idno/Known/blob/master/IdnoPlugins/IndiePub/Pages/MicroPub/Endpoint.php#L588
# jeremycherfas I see. So need to look at what the remote server sends. Although I am not seeing anywhere in `endpoint.php` where $mimetype is added to filename as an extension. Or maybe it doesn't need to be.
tantek joined the channel
# jeremycherfas Let me try for the final image as Known saves it.
# jeremycherfas Bingo `Content-Type: application/data`
# jeremycherfas !tell mapkyca When quill uploads the image to the temp storage, it is `Content-Type: image/jpeg`
# jeremycherfas But when I look at the image link directly, it is `Content-Type: application/data`
# jeremycherfas Go to post a photo note in Quill.
# jeremycherfas When the image preview is showing and Quill shows the link, do `curl -I link-to-tempfile'
# jeremycherfas Content-Type: image/jpeg
# jeremycherfas Post the photo to Known.
# jeremycherfas Copy the link of the image as shown by Known.
# jeremycherfas Do `curl -I link-to-image`
# jeremycherfas Content-Type: application/data
# jeremycherfas So not quite. The image saved at the media endpoint is temporary. Known then saves it permanently elsewhere.
# jeremycherfas I hope so. Is it worth my writing up? I can create an issue and stick it on my website.
[pfefferle], sketchess, tantek__ and [cleverdevil] joined the channel
# [cleverdevil] Hmm. Interesting. Tag me on the bug on GitHub too please. I may have a chance to take a look at some point.
# jeremycherfas Not exactly sure how to do that, so here's the link https://github.com/idno/Known/issues/2097
[jgmac1106], seekr, dosch[m], [grantcodes], wakest, pvagner, plindner, jaduncan[m], zoglesby, sketchess, tantek__, [keithjgrant], [kevinmarks], [chrisaldrich], [miklb], [cjwillcock] and [cleverdevil] joined the channel