httpshare

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 5 Imported by: 0

README ยถ

httpshare

httpshare is a powerful web-based file manager written in Go. It allows you to quickly share, browse, and manage files over HTTP with minimal setup.

Features

File Management
  • ๐Ÿ“ค File Upload: Upload files directly from your browser
  • ๐Ÿ—‘๏ธ Delete: Remove files and folders with confirmation
  • โœ๏ธ Rename: Rename files and directories
  • ๐Ÿ“ Create Folders: Create new directories on the fly
Browsing & Organization
  • ๐Ÿ” Search: Real-time search for files and folders
  • ๐Ÿ”ค Sorting: Sort by name, size, or modification date
  • ๐Ÿ“Š File Information: View file size, modification time, and permissions
  • ๐Ÿ–ผ๏ธ Image Preview: Automatic thumbnail display for images
Content Preview
  • ๐Ÿ‘๏ธ File Preview: Preview text files, PDFs, videos, and audio files directly in the browser
  • ๐Ÿ“ Markdown Rendering: View .md files with full formatting, syntax highlighting, and styling
  • ๐Ÿ–ผ๏ธ Gallery Mode: Browse images with a beautiful slideshow interface
    • Navigate with arrow keys or on-screen buttons
    • Click any image to open it in gallery mode
    • View image counter and filename
  • Support for: .txt, .md, .log, .json, .xml, .csv, .pdf, .mp4, .webm, .mp3, .wav
Interface
  • Lightweight and easy to use
  • Modern, responsive web interface with dark theme
  • Mobile-friendly design
  • Configurable port
  • Simple web interface for browsing and downloading files
  • Configurable port and directory
  • Cross-platform: works on Windows, Linux, and macOS

Installation

Make sure you have Go installed. Then, run:

go install gitlab.com/isa0/httpshare@latest

This installs the httpshare binary in your Go bin directory (usually $GOPATH/bin).

Usage

**Start the file explorer with the following command:

httpshare [--port <port>] [--directory <path>]
Options
  • --port: Set the port to serve the files (default: 8080)
  • --directory: Specify the directory to serve (default: current directory)
  • --log: Write logs into a file (default: disabled)

Then, open your web browser and navigate to:

http://localhost:<port>

You will see a modern web interface to browse, manage, and preview files in the current directory.

API Endpoints

The application provides RESTful API endpoints for programmatic access:

  • POST /api/upload - Upload files
  • DELETE /api/delete?path=<path> - Delete files/folders
  • POST /api/rename - Rename files/folders
  • POST /api/mkdir - Create new directory
  • GET /api/search?q=<query>&path=<path> - Search files
Example: Upload a file using curl
curl -F "file=@myfile.txt" -F "path=." http://localhost:8080/api/upload
Example: Delete a file
curl -X DELETE "http://localhost:8080/api/delete?path=myfile.txt"

You will see a simple web interface to explore and download files in the specified directory.

Example

Serve files from /home/user/Documents on port 3000:

httpshare --port 3000 --directory /home/user/Documents

Contributing

Contributions are welcome! Feel free to submit issues or merge requests.

License

This project is licensed under the MIT License.

Documentation ยถ

The Go Gopher

There is no documentation for this package.

Directories ยถ

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL