Skip to content

TagSteel/ImageLinker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Uploader (Vanilla Web)

Github Release License: MIT Platform: Web

Minimal web app to:

  • upload an image,
  • generate a shareable link,
  • display the image from that link.

Tech Stack

  • Frontend: Vanilla HTML, CSS, JavaScript
  • Backend: Native PHP (no framework, no Node.js)

Project Structure

  • index.php - Upload page
  • api/upload.php - Upload endpoint
  • image.php - Shared image view page
  • .htaccess - Pretty URL routing (/image/<id>)
  • public/ - Static assets
  • uploads/ - Stored uploaded images

Features

  • Upload support: PNG, JPG/JPEG, WEBP, GIF
  • Max file size: 10 MB
  • Secure MIME validation server-side
  • Random unique image IDs
  • Shareable URL format: /image/<id>

Deployment

  1. Deploy files to a web server with PHP enabled (Apache recommended for .htaccess).
  2. Ensure uploads/ is writable by the web server user.
  3. Open your domain root URL.

API

POST /api/upload.php

Request type: multipart/form-data

Field:

  • image (file)

Success response (201):

{
  "id": "hex_id",
  "viewUrl": "https://your-domain.com/image/hex_id",
  "viewPath": "/image/hex_id",
  "filePath": "/uploads/hex_id.jpg"
}

License

This project is licensed under the MIT License. See the LICENSE file.

About

Lightweight vanilla PHP web app to upload images and generate shareable links with clean URLs.

Topics

Resources

License

Stars

Watchers

Forks

Contributors