chrisp
chrisp

Reputation: 58

Embed large or non-standard files in github issues

We use Github's issue tracking for a lot of project management, both code-related and not. For simple files like images, we can share them with Github's CDN via drag and drop into an issue or comment. However, this has limitations:

  1. Github imposes a file type restriction: they will only allow GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP.

  2. Files larger than 25 MB or images larger than 10 MB are not supported.

  3. While URLs are anonymized with Camo (https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/about-anonymized-image-urls), files are not actually securely stored or password protected. This is really problematic when the files shared have a lot of sensitive data in them.

Is there a plugin or simple solution that would let us securely attach large or non-standard file types, while maintaining the nice UI of github issues? We'd be ok using a 3rd-party storage system (like Drive/Dropbox/Sharepoint/AWS), but forcing users to upload something then copy/paste a link over into the issue isn't ideal.

Upvotes: 0

Views: 37

Answers (1)

bk2204
bk2204

Reputation: 76489

There's no way for you to embed other file types in an issue without using a standard Markdown link that gets rendered through Camo. That's because GitHub has a strict Content-Security-Policy that prevents files from other domains from even loading. That's intentional, since it prevents people from trying to embed tracking content or content that changes based on the user (e.g., ads).

Even if you could use some way to embed the files in the page, your browser probably wouldn't render them due to the Content-Security-Policy.

Upvotes: 1

Related Questions