Skip to main content

此版本的 GitHub Enterprise 将停止服务 2022-10-12. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

Attaching files

You can convey information by attaching a variety of file types to your issues and pull requests.

警告:如果在拉取请求、问题评论或 GitHub 支持门户 票证中附加了文件,则任何人都可以查看匿名 URL,无需身份验证,即使该拉取请求位于专用存储库中,或者启用了专用模式。 要对敏感媒体文件保密,请从需要身份验证的私有网络或服务器提供它们。

To attach a file to an issue or pull request conversation, drag and drop it into the comment box. Alternatively, you can click the bar at the bottom of the comment box to browse, select, and add a file from your computer.

Select attachments from computer

When you attach a file, it is uploaded immediately to GitHub Enterprise Server and the text field is updated to show the anonymized URL for the file.

Tip: In many browsers, you can copy-and-paste images directly into the box.

The maximum file size is:

  • 10MB for images and gifs
  • 100MB for videos
  • 25MB for all other files

We support these files:

  • PNG (.png)
  • GIF (.gif)
  • JPEG (.jpg)
  • Log files (.log)
  • Microsoft Word (.docx), Powerpoint (.pptx), and Excel (.xlsx) documents
  • Text files (.txt)
  • PDFs (.pdf)
  • ZIP (.zip, .gz)
  • Video (.mp4, .mov)

Note: Video codec compatibility is browser specific, and it's possible that a video you upload to one browser is not viewable on another browser. At the moment we recommend using h.264 for greatest compatibility.

Attachments animated GIF