Yarn

Recent twts in reply to #agjpbta

@prologic@twtxt.net - I do not want to nag about it - but did you find some way to post image through curl? (Or could you share the almost-working solution that you tried?), if you have not had time - then that’s fine too. I want to start looking into it again :)

⤋ Read More

@stigatle@yarn.stigatle.no Yeah sorry about that! Here’s how to do it!

$ curl -F media_file=@gitea.png -H "Token: $YARND_TOKEN" https://twtxt.net/api/v1/upload
{"Type":"taskURI","Path":"https://twtxt.net/task/FiBmMQbNF7bicLSZsWybmN"}
$ curl https://twtxt.net/task/FiBmMQbNF7bicLSZsWybmN | jq '.'
{
  "state": "complete",
  "error": "",
  "data": {
    "mediaURI": "https://twtxt.net/media/rhkm36YACemg7TBmG7d2Q6.png"
  }
}

⤋ Read More

Basically:

  1. Hit the /api/v1/upload endpoint with a valid token and media_file as a Form URL encoded payload.
  2. Hit the Task endpoint you get back until status=complete
  3. Use the URI once complete

⤋ Read More

@prologic@twtxt.net I do that now, and all that works, it’s just that I do not (currently) check it multiple times, in the test I did it completed as soon as the image was uploaded. But yeah I have to do some more with that for bigger files for sure. I’ll look into that next.

⤋ Read More

@prologic@twtxt.net that would make me proud. Ill add more description and screenshots to the readme so that people can see more easily what it looks like etc. I also want to make ready packages for it, and see if I can crosscompile for windows as well.

⤋ Read More

I had some time to code this afternoon, so I have made some polling now, so if a task is not completed it waits 2 secs and tries again, if the server reports a error in the task it stops polling, when the task is successfull it will add the resulting image tag to the status input field. Quite pleased with this now. After this I’ll work on ‘view conversation’, meanning you can open a conversation and see all posts in it, that’ll make it even easier to follow conversations and to reply etc.

⤋ Read More

Participate

Login to join in on this yarn.