xuuexu
2020-2-20 10:02:10

@xuuexu has joined the channel


brentgordon146
2020-2-20 14:18:31

not exactly but i used a commandline tool to upload to the media endpoint and got a different response than what i expected


brentgordon146
2020-2-20 14:19:24

duckduckgo hasn’t been that good for programming search results for me


deactivateduser60718
2020-2-20 15:00:29

If you post code of your best attempt we can go from there. Try using post-pure-port if that’s easier. It also looks like you’ll need to use media_ids parameter, which you should be able to populate using a body like that in https://stackoverflow.com/a/10002996/394397


deactivateduser60718
2020-2-20 15:01:18

It just so happens that I finished an example using a POST multipart form data. See if you can adapt https://github.com/zyrolasting/syntax-highlighting/blob/master/lusever.rkt to your needs.


deactivateduser60718
2020-2-20 15:02:46

@brentgordon146 You can try http://startpage.com\|startpage.com


brentgordon146
2020-2-20 17:23:46

ok now I’m getting invalid multipart body ends soon


deactivateduser60718
2020-2-20 18:05:21

Keep at it. If you are truly stuck, then please share the code and the exact error.


brentgordon146
2020-2-20 18:23:43
 (bytes-append
  (string->bytes/utf-8 (string-append boundary-line "Content-Disposition: form-data; name=\"media_ids[]\""
                 (format "Content-Type: image/~a" (if (eq? file-ext "jpg") "jpeg" "png")) CRLF))
                   (file->bytes filename)
  (string->bytes/utf-8 (string-append CRLF "--" boundary "--" CRLF))))

brentgordon146
2020-2-20 18:24:09

HTTP/1.1 400 Bad Request pipe::1: read-json: bad input #"# Plug.Parsers.ParseError at POST /api/v1/statuses\n\nException:\n\n ** (Plug.Parsers.ParseError) malformed request, a RuntimeError exception was raised with message "invalid multipart, body terminated too soon"\n (plug 1.9.0) lib/plug/con…


allenfokbeta
2020-2-20 18:42:42

@allenfokbeta has joined the channel


deactivateduser60718
2020-2-20 19:06:57

Double check your boundary lines. I’ll bet you that one of them is misplaced. You’ll also need an additional line separating Content-Disposition stuff from the actual value.


deactivateduser60718
2020-2-20 20:14:35

I’m looking to publish some screencasts but do not want to use YouTube. I’d prefer privacy-focused FOSS alternatives. Free (as in speech) is a must. Free (as in beer) is preferred, but am happy to pay if it comes to that.

I looked at PeerTube, but that seems to have low quotas unless I host my own instance. DTube seems viable, but I’m unsure if the governance structure will work out in the long term.

Any suggestions?


deactivateduser60718
2020-2-20 21:02:12

Since I already have a Cloudfront, it might be best to just host videos there.


popa.bogdanp
2020-2-20 21:05:45

I’m a fan of plain <video> tags and dedicated boxes.


popa.bogdanp
2020-2-20 21:06:02

Dedicated HW is really cheap nowadays. For example: https://www.scaleway.com/en/dedibox/start/start-2-s-ssd


popa.bogdanp
2020-2-20 21:09:13

This screencast is hosted on a (slightly larger than the one I linked) Scaleway server:

https://media.defn.io/dramatiq.mp4


deactivateduser60718
2020-2-20 22:18:00

Thank you for this!!