#LoqiWARC is a web archive (Web ARChive) format designed to collect all of the resources that make up a web page into a single item that does not require any external references when opened https://indieweb.org/WARC
#ludovicchabantthanks :) so yeah I was wondering if there was library support for handling both url-encoded forms and multipart/form-data in a transparent way
#aaronpkhi! yep we try to keep tech jargon in this channel
#aaronpklike I was saying, it should be part of most standard web frameworks, since it's how HTML forms work
#ludovicchabantlooking back at my logs, it looks like Werkzeug is maybe not handling it correctly because the request is done with the `application/json` mime type and not `multipart/form-data` ?
#ludovicchabant(the request is coming from Quill's HTML editor btw)
#aaronpkah yeah so Quill's HTML editor only sends JSON requests
#aaronpkif you want a tool to try sending all combinations of requests to your endpoint, https://micropub.rocks will do the job
#aaronpkbut we decided that instead of continuing to overload the form-encoded syntax for more complicated things like nested objects, we'd just use the JSON syntax at that point
#aaronpkHTML content is an example of that. in form-encoded syntax it would have been content[html]=<b>hello</b> but then even fewer backend frameworks support that out of the box
#ludovicchabantok, makes sense, but for example for Quill it looks like the JSON is more complicated than it could be? Pretty much all properties are lists when most could be just strings? Or is there any use-case for, say, multiple 'name' or 'mp-slug' values?
#aaronpkyeah that's because micropub's JSON syntax is the parsed Microformats JSON, and in that case every value is always an array
#aaronpkit's a tradeoff between making the spec vocabulary-aware vs generic
#ludovicchabantah ok -- I'll have to lookup the Microformats JSON spec then
#ludovicchabantfor the content[html] stuff, what's the pros/cons vs. just making another property, like "content_html" vs "content"?
#ludovicchabantor is that basically a problem of remapping Microformats JSON syntax back into HTML form data?
#aaronpkwell tying it to microformats means micropub is defining one less thing on its own, which is usually a good thing for specs
#aaronpkand trying to represent everything as form-encoded unfortunately means you have to make up something new at some point, since form-encoded syntax is very limited by default
#ludovicchabantwell I guess I'll check if there's a Microformats lib for python then :) otherwise I think if the spec guarantees that every property is a list, the server code might not be too complex
#aaronpkyeah in the JSON micropub syntax, every value will be a list even if there is only one value
#ludovicchabantcheers! (spoiler warning: you'll probably hear more from me in the next couple weeks :) )
#[eddie]hey aaronpk: I fixed some errors on my compass server, but I’ve found a new one I’m not sure about: “No supported encrypter found. The cipher and / or key length are invalid.” Stack overflow said that is typically an OpenSSL issue or an .env error. I don’t see anything in the .env.example about cipher so do I need to install something open SSL separately?
#[eddie]I’m not sure what all software composer takes care of
#[eddie](I am making notes so we can have a “troubleshooting” section of the README in case anyone runs into some of these in the future. Once I get this all working 100% I’ll send a PR with that section)
#[eddie]Victory! Looks like I don’t have memcached installed ? that should be easy enough. Hopefully we’re close to the finish line
#[grantcodes]cleverdevil Yeah even some sort of mock server would be super helpful, doesn't need to actually work fully according to the spec, just return sample data
#[grantcodes]Then there is also the cors issue unless the microsub spec is going to define something about that
#[grantcodes]But it's kind of difficult to solve as well since you also need to scrape the persons site to find their endpoints, so their homepage would need to have the Access-Control-Allow-Origin header set up
#aaronpki should probably start experimenting with writing a Microsub server
#[grantcodes]I'm almost tempted to have a go at building one as well. Would be kinda awesome to have 3+ implementations before the spec is even complete ?
#[grantcodes]In another topic should micropub endpoints support delete requests for files uploaded to the media endpoint? Just ran into that problem.
#[cleverdevil]I don't see anything in the micropub.rocks tests for that.
#[grantcodes]Yeah there's no documentation on it. All I can see is "Micropub servers should support deleting posts"
#[grantcodes]But no reason you couldn't just pass the url to a file rather than a post
#[kevinmarks]Having 3 implementations is really good for a spec
#[grantcodes]But then that would be to the micropub endpoint not the media endpoint and they could be seperate
#aaronpkif you're going to delete from the media endpoint I'd think that request would be made to the media endpoint
#aaronpkthe media endpoint isn't intended to be a full media collection manager tho, more like an in-transit thing
#aaronpkthe way mine works, my micropub endpoint ends up downloading a copy of the file at the media endpoint and storing it locally anyway. i could eventually write a cleanup script that would delete old stuff from the media endpoint even.
gRegorLove joined the channel
#[grantcodes]Yeah, I thought it would need to be to the media endpoint because of the separation. Could the media endpoint not just support DELETE requests then? Actually no I just realised that wouldn't work, because the url of the file is not the same as the endpoint
#[grantcodes]My use case is if I upload the wrong photo to an article or gallery or whatever and remove it - it gets removed from the micropub request but the wrong file is still sitting there
#aaronpkyeah that's part of the "cleanup" that the media endpoint can do
#aaronpkthe twitter API docs (where the media endpoint idea came from) says that if a file isn't used in a tweet in some amount of time, it will be deleted
#[grantcodes]Hmm yeah I suppose that's possible, bit more difficult to build though!
#aaronpkpick some time window, like a week. if nothing has requested the file in a week, it was likely never actually used
#[grantcodes]Not necessarily, I have mine on the same server so I just link to the file, I don't download it, so it would require someone to actually view the post that the file is attached to
#aaronpkdoes your browser show you the post after it's been created?
#aaronpki guess my point is if both endpoints on an implementation are tightly coupled, then there are several mechanisms you can use to determine whether a file has been used in a post
#[grantcodes]Yeah I agree, but if they are not then automatic deletion is a (quite unlikely) potential issue
#aaronpkalso disk space is cheap, so having an extra file or two around isn't the end of the world
#[grantcodes]If you are dealing with full res photo galleries it can become an issue ? - I know I'm about the only person doing that at the moment though
#aaronpkyea i suppose. I still think there are ways to deal with it when it becomes important, without requiring that clients add any additional logic
mdcox joined the channel
#[grantcodes]Cool, fair enough. May be worth mentioning somewhere in the docs ?
#aaronpkconsiders attempting to write a microsub endpoint right now
KartikPrabhu and [kevinmarks] joined the channel
#aaronpkreviewing my AWS usage from last month, and discovered that people have downloaded 63gb of avatar icons off my site in september
#[eddie]aaronpk: Back home. Compass is getting so much closer! But not quite there ? Mysql error this time. the users table doesn't seem to exist. Is that supposed to be auto-created at some step or is there a script I'm supposed to run?
#aaronpksorry it's been such a hassle! will definitely appreciate your notes on this
#[eddie]No worries, it takes different environments to get this stuff worked out ? I'm just happy to help.
#[eddie]Speaking off... looks like i got an internal server error (500) back to Overland. I'll check my logs on Compass real quick to see what is causing that. I created the database inside of Compass and copied the API endpoint string into the app.