Back to Blog

Feature Announcement

Drag & Drop Upload

Drag files or entire folders from your computer to create multi-file snippets instantly. No more copy-pasting one file at a time.

Creating multi-file snippets used to mean adding files one by one, typing filenames, pasting code, and manually selecting the language and type for each. That workflow is gone.

Now you can drag files or folders directly from Finder, Explorer, or any file manager into the pastecn editor. Everything is auto-detected: filename, language, registry type, and relative paths.

How it works

1

Drag from your file manager

Select files or folders in Finder, Explorer, or any file manager and drag them into the pastecn editor. A drop zone overlay appears to confirm.

2

Everything is auto-detected

Language is inferred from file extensions. Registry type is inferred from the path: files in hooks/ become hooks, files in components/ become components, and so on.

3

Create the snippet

Review the files, adjust anything if needed, and hit Create Snippet. You get a shareable registry URL that preserves your file structure.

Features

Folder support

Drop entire folders and pastecn recursively reads all files inside, preserving the directory structure as relative paths.

Smart detection

Language is inferred from extensions (.ts, .tsx, .css, .json, and more). Registry type is inferred from path conventions: hooks/, components/, lib/.

File picker fallback

Prefer clicking? The Upload Files button opens your native file picker. Same auto-detection, different input method.

Unsupported files handled

Binary files, images, and unsupported extensions are automatically skipped with a notification. Only text files that pastecn supports are added.

Supported file types

The following extensions are recognized and auto-detected:

Extensions
.tsTypeScript
.tsxTSX
.jsJavaScript
.jsxJSX
.jsonJSON
.mdMarkdown
.cssCSS
.txtPlain Text

Files larger than 500 KB are skipped to keep snippets fast and lightweight.

Path-based type inference

When you drop a folder, pastecn uses the file path to automatically set the registry type. The matching prefix is stripped from the filename to avoid duplication.

Examples
hooks/use-counter.tstype: Hook, file: use-counter.ts
components/ui/button.tsxtype: Component, file: ui/button.tsx
lib/fetcher.tstype: Lib, file: fetcher.ts
README.mdtype: File, file: README.md

Use cases

Share a component with its hooks. Drop a folder with components and hooks together. Paths and types are preserved.

Share a design system block. Drop multiple related files and create a registry block that installs with a single command.

Quick prototyping. Drag utility files from a project into pastecn to share a working setup with a teammate.