Using code snippet attachments
Cacher’s code snippet manager empowers you and your team to get more done, faster. Try all features free.
Ever since we introduced rich Markdown support for Cacher snippets, users have asked us to make uploading images and files easier. Up until recently, you’ve had to host Markdown images on a separate file server, then manually link them within the code editor. To fix this workflow bottleneck, we launched snippet attachments.
Why attachments?
File and image attachments help to provide context for the snippet. Why describe in words (or code) what an image or PDF can do better?
Here are just a few applicable use cases we tried to tackle:
- Providing screenshots for Markdown documentation.
- Showing animated demos using GIF files.
- Sharing error logs in snippet comments.
- Distributing
.docx
,.pdf
,.pptx
files and other longer-form documentation.
Where can I upload attachments?
We’ve tried to enable attachments in all places where additional context would help in understanding a snippet.
The attachments area
Every snippet now comes with an attachments area beneath its files. From here you can upload files, copy URLs and delete attachments. Attachments listed here are culled from Markdown files, the snippet description, comments and directly-attached files.
Markdown files
Attaching screenshots and other files to Markdown documents is now easier than ever. Dragging an image or file to the editor will cause it to be inserted directly into the code and displayed in the preview area.
Snippet description
There has always been some confusion about what sort of content is allowed in a snippet’s description. By adding a Markdown toolbar and the Attach File button, we’ve tried to make it clear that you can stick longer-form documentation into the description.
Snippet comments
Sometimes it really helps to view logs and screenshots while debugging snippet code. We’ve added the same attachment capability to comments.
Limitations and Plans
There are currently no limits on the type of files you can upload to a snippet. We’re starting with this design because we don’t honestly understand the full set of use cases yet. Assuming users are responsible, we see no reason to curtail this capability.
Here are the limitations by subscription plan:
- Free: Attachments up to 10 MB and 50 MB/month upload limit.
- Pro: Attachments up to 50 MB with no monthly limit.
- Team: Attachments up to 100 MB with no monthly limit.
You can view a detailed comparison of our plans on our Pricing page.
If you have any feedback on the feature, please leave it in the comments below or visit our community forum.