79550886

Date: 2025-04-02 14:22:41
Score: 1
Natty:
Report link

Can I upload a document to an Issue in github?

Yes. Search for:

<span
  data-component="text"
  class="prc-Button-Label-pTQ3x"
> Paste, drop, or click to add files </span>

This shall invoke <input type="file">.


I have a document that I would like to reference from a github issue, but there is not a way to upload it. Any ideas?

Unfortunately, its Accept header is */*, which means that all file upload type validation occurs server-side.

If you upload an impermissible file type (say, .pak), you shall see:

File type not allowed: .pak

However, this occurs after file upload. To avoid this, GitHub luckily documents its upload restrictions:

Types [1]

We support these files:

  • PNG (.png)

  • GIF (.gif)

  • JPEG (.jpg, .jpeg)

  • SVG (.svg)

  • Log files (.log)

  • Markdown files (.md)

  • Microsoft Word (.docx), PowerPoint (.pptx), and Excel (.xlsx) documents

  • Text files (.txt)

  • Patch files (.patch)

    If you use Linux and try to upload a .patch file, you will receive an error message. This is a known issue.

  • PDFs (.pdf)

  • ZIP (.zip, .gz, .tgz)

  • Video (.mp4, .mov, .webm)

Sizes [2]

The maximum file size is:

  • 10MB for images and gifs
  • 10MB for videos uploaded to a repository owned by a user or organization on a free plan
  • 100MB for videos uploaded to a repository owned by a user or organization on a paid plan
  • 100MB for videos
  • 25MB for all other files
Reasons:
  • Blacklisted phrase (1): Any ideas
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Can I
  • Low reputation (0.5):
Posted by: RokeJulianLockhart