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

omarieclaire

Image_uploader

Upload images for your projects
Remix of stevekrouse/fileInputUploadExample
Public
Like
Image_uploader
Home
Code
2
README.md
H
main.tsx
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
…
README.md

Image Upload Tool for Val Town

A image hosting solution built on Val Town's blob storage. Upload images and get permanent, shareable URLs instantly.

What This Does

This val provides a web interface for uploading images to Val Town's blob storage and generates permanent URLs that you can use anywhere.

Key Features:

  • Generates permanent, shareable image URLs
  • Images stored in Val Town's blob storage (powered by Cloudflare R2)

How It Works

  1. Upload: Select an image file (PNG, JPG, GIF, WebP)
  2. Store: The image is saved to Val Town blob storage with a unique timestamped key
  3. Share: You receive a permanent URL in the format: https://your-val.web.val.run/image/img_timestamp_filename.png
  4. Use: Copy the URL and use it anywhere you need

Storage Details

  • Images are stored in Val Town's blob storage, which is backed by Cloudflare R2
  • Each upload gets a unique key: img_[timestamp]_[filename]
  • Images are cached with a 1-year cache header for optimal performance
  • All images in your account can be managed at: https://www.val.town/settings/blob

Limitations

  • File size: ~1MB per upload (Val Town form upload limitation)
  • Total storage:
    • Free tier: 10MB total
    • Pro tier: 1GB total
  • File types: Images only (PNG, JPG, GIF, WebP, SVG)
  • For files larger than 1MB, consider uploading to another service first, then fetching server-side

Credits

This val is a remix of @stevekrouse/fileInputUploadExample, which demonstrated the basic pattern for file uploads with Hono and Val Town.

The original example showed how to set enctype="multipart/form-data" on forms. This remix extends that foundationc with:

  • Persistent blob storage instead of just echoing the file back
  • Permanent URL generation for uploaded images

Usage

  1. Fork this val to your own Val Town account
  2. Visit your val's endpoint (it will have a URL like https://yourusername-valname.web.val.run)
  3. Upload images and copy the generated URLs
  4. Manage or delete uploaded images at https://www.val.town/settings/blob
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
© 2025 Val Town, Inc.