• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
flymaster

flymaster

Images

Public
Like
Images
Home
Code
3
backend
2
frontend
1
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
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.
Sign up now
Code
/
README.md
Code
/
README.md
Search
11/21/2025
Viewing readonly version of main branch: v10
View latest version
README.md

Simple Image Hosting Site

A minimal image hosting service that allows users to upload images and view the last 4 uploaded images.

Features

  • / - View the last 4 uploaded images (newest first)
  • /add - Upload form for new images
  • Automatic cleanup: images are deleted when there are 4 newer images
  • Mobile and desktop friendly
  • No frontend JavaScript required
  • File size limit: 10MB per image
  • Supports common image formats (JPEG, PNG, GIF, WebP)

Technical Details

  • Built with Hono framework
  • Uses SQLite for metadata storage (filename, content type, file size, upload date)
  • Uses Val Town Blob storage for image files (stored as base64)
  • Images are automatically cleaned up when more than 4 are uploaded
  • Responsive design with CSS Grid and Flexbox
  • Server-side rendering with no client-side JavaScript

Structure

  • backend/index.ts - Main application entry point (HTTP trigger)
  • backend/database/migrations.ts - Database schema initialization
  • backend/database/queries.ts - Database operations and image management
  • frontend/style.css - Responsive CSS styling

Usage

  1. Visit the root URL to see uploaded images
  2. Click "Upload New Image" to go to the upload form
  3. Select an image file and click "Upload Image"
  4. You'll be redirected back to the home page to see your uploaded image
  5. Only the 4 most recent images are kept; older images are automatically deleted

API Endpoints

  • GET / - Home page with image gallery
  • GET /add - Upload form page
  • POST /add - Handle image upload (multipart/form-data)
  • GET /image/:blobKey - Serve individual images
  • GET /frontend/style.css - CSS stylesheet
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.