How to attach file to a github issue?

后端 未结 12 1585
天命终不由人
天命终不由人 2020-12-23 12:48

I migrated with a project from Bitbucket to Github and I can not find a way to attach a file to an issue (ex: screenshot, specs, etc)

How to do it?

相关标签:
12条回答
  • 2020-12-23 13:18

    To attach a file to an issue or pull request conversation, drag and drop it into the comment box.

    The maximum size for files is 25MB and the maximum size for images is 10MB.

    Upload Image

    0 讨论(0)
  • 2020-12-23 13:21

    The format for embedding images into a GitHub comment is:

    Format:  ![Alt Text](url)
    Example: ![GitHub Logo](/images/logo.png)
    
    0 讨论(0)
  • 2020-12-23 13:27

    You upload it somewhere and add the link in a comment. GitHub's Issues is rather primitive and doesn't allow attaching files.

    Update: You can post images to GitHub issues now. The easiest way is to copy the image (right click, Copy image) and then paste it into the text box where you describe the issue.

    OR

    Just drag and drop

    0 讨论(0)
  • 2020-12-23 13:28

    It's a bit of a kludge but you could create a junk branch, then commit the file to that branch and purge it later.

    EDIT: This script may be of use to you:

    https://github.com/wereHamster/ghup

    0 讨论(0)
  • 2020-12-23 13:28

    One quick/easy hack is to upload your attachment (say PDF or Office doc) to Dropbox, then include the Dropbox URL in the Github issue.

    Mildly easier than using S3; many organizations are already using Dropbox; and Dropbox has good support for viewing many documents inline in the browser already.

    0 讨论(0)
  • 2020-12-23 13:31

    As of December 7, 2012, you can attach images by drag/drop or use a file chooser. See https://github.com/blog/1347-issue-attachments for more details.

    0 讨论(0)
提交回复
热议问题