Using code snippet attachments

Rui Jiang
Rui Jiang
Oct 15, 2019 · 3 min read
Uploading an image to a Markdown snippet file

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.

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.

Attachments area for a snippet

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.

Attaching a PDF to a Markdown file

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.

Uploading an image to the Markdown description

Sometimes it really helps to view logs and screenshots while debugging snippet code. We’ve added the same attachment capability to comments.

Attaching an error log to a comment

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.

Cacher is a code snippet organizer for pro developers — beautiful user-centric UI, integrations for popular editors/IDEs, support for 100+ languages.

Sign up at cacher.io.

Cacher App

The code snippet organizer for professional developers

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store