Public
Like
10
FileDumpThing
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v59View latest version
This app allows you to easily share files and text snippets by pasting or uploading them. It's built with React on the frontend and Hono on the backend.
- Paste text or images directly into the app
- Upload files through the file input
- Get shareable links instantly
- Links are automatically copied to your clipboard
- Preview images and text content
- CLI tool for uploading files directly from your terminal
- The app uses Val Town's blob storage to store uploaded files and text
- When you paste or upload content, it's sent to the server and stored
- A unique URL is generated that can be shared with others
- The content can be accessed directly through the generated URL
-
Frontend: React components for the user interface
components/FileDumper.tsx
: Main component for the file dumper interfacecomponents/App.tsx
: Root component that renders the FileDumperindex.tsx
: Entry point for the React applicationindex.html
: HTML template
-
Backend: Hono server for handling API requests
index.ts
: API routes for file uploads and serving stored content
-
Shared: Code shared between frontend and backend
utils.ts
: Shared types and utility functionsmimetype.ts
: MIME type detection for various file formats
-
CLI: Command-line interface for file uploads
upload.ts
: Deno script for uploading content via stdin
You can use the CLI tool to upload files directly from your terminal:
# Upload a file and get a shareable URL cat path/to/file.jpg | deno run --allow-net https://esm.town/v/wolf/FileDumpThing/cli/upload.ts file.jpg
See the CLI README for more details and examples.
- Uses Val Town's blob storage for file persistence
- Built with TypeScript for type safety
- React for the frontend UI
- Hono for the backend API
- Supports various file types with appropriate MIME type detection
- CLI tool for terminal-based uploads