通过GitHub API创建图片问题 [英] Create an issue with image via GitHub API

查看:77
本文介绍了通过GitHub API创建图片问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 https://developer.github.com/v3/issues/#创建-AN-问题

我尝试了'Accept','application / vnd.github.v3.html + json'是否可以将图片附加到邮件正文? 并将图像作为img elment base64编码。该图像不会显示,但售票编辑器显示img元素。

I tried 'Accept', 'application/vnd.github.v3.html+json'and emmbeded the image as img elment base64 encoded. The image will not show, but the ticket editor shows the img element.

推荐答案

没有简单的解决方案。官方文档没有提到任何关于这意味着它不被支持的内容。

There is no simple solution to this. The official docs say nothing about that which means it's not supported.

GitHub.com认证基于cookie工作,而API认证使用令牌/密码。这意味着如果你真的想要使用GitHub上传你的图片,你必须使用cookie来登录,这比使用第三方图片托管网站可能更难。

The GitHub.com authentication works based on cookies while the API authentication uses tokens/passwords. That means if you really want to hack the things to upload your image using GitHub, you have to login using a cookie which is probably more difficult than using a third-party image hosting website.

例如,您可以将您的图片上传到imgur,然后将其添加到问题主体中: $ b

For example, you could just upload your image to imgur and then add it in the issue body:

![image-title](http://i.imgur.com/x....xx.png)



无论如何,这将由GitHub代理代理,并将提供HTTPs。

This will anyway be proxied by GitHub proxy and will be served offer HTTPs.

这篇关于通过GitHub API创建图片问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆