Githawk: Add file to comment

Created on 15 Jul 2017  路  9Comments  路  Source: GitHawkApp/GitHawk

Would be nice to add images from camera roll, but also with iOS 11 "Files" being a thing and drag and drop being all the craze I would love to see you take advantage of this!

(Maybe the last bit can be wishlist!)

All 9 comments

Would love this, some considerations:

  • How documented is the file API that GitHub.com uses? If its private, we can reverse engineer it but that might be risky (infringe on their API, could change at any time)
  • Any preprocessing on things like images?

https://stackoverflow.com/a/34329646 馃槩

Maybe I was optimistic, looks like they don't have a public API at the moment!
As you say I'm sure there's a way to get round that, but probably not worth the risk

A possible alternative would be to upload images to an external source, e.g. imgur (they do have a free API!), and then just reference that in the issue? ![Image](url)

Investigated this a bit further today, and the requests GitHub make are fairly simple - But unfortunately the first request has a header which blocks connections from non-Github sources. Immediately blocking us from uploading from the app 馃槩

Unless we put a request in and see what happens, I see our only option as using a public API such as Imgur to upload images to?

@rnystrom

@Sherlouk good snooping, bummer. I think imgur would be fine actually, as long as there aren't any limitations.

https://apidocs.imgur.com/#intro
Just reading the Imgur docs and their rate limit is 1,250 uploads per day - Should be enough?

https://apidocs.imgur.com/#4b8da0b3-3e73-13f0-d60b-2ff715e8394f
To upload we just need to get the bytes from an image, and base64 encode them. With a little bit more work (maybe not in first iteration) we could turn videos into GIFs

@rnystrom If you're happy to go with this approach, would you mind setting up a client and DMing me the client ID etc?

Think it would be nice to prioritise the image stuff a bit higher, especially with the "report a bug" feature a screenshot speaks a thousand words! (prompted by #462)

@BasThomas any opinions on the matter?

Yes, let鈥檚 do it! Probably not too hard when we use imgur.

Sent with GitHawk

Created account, sent @Sherlouk id+secret

Gonna leave this issue open for now, #475 was the PR to get image uploading working for bug reports. Still could have further improvements to support other files, add image upload to other forms (comments/edit etc) and drag'n'drop support 馃槃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

weyert picture weyert  路  3Comments

rnystrom picture rnystrom  路  3Comments

rnystrom picture rnystrom  路  3Comments

BasThomas picture BasThomas  路  3Comments

BasThomas picture BasThomas  路  3Comments