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:
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
) documentsText 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 (
ZIP (
.zip
,.gz
,.tgz
)Video (
.mp4
,.mov
,.webm
)
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