🎬 Digicom Media Server

Media Storage & Retrieval API Documentation

Initializing...
Loading...
8601
Loading...

📖 Overview

The Digicom Media Server is a high-performance, scalable media management system built with Fiber (Go web framework) and MinIO (S3-compatible object storage). It provides RESTful APIs for uploading, retrieving, and managing image and video files.

Key Features

🔌 API Reference

Health Check

GET
/health
Verify server is running and check configuration details
Response:
{ "status": "ok", "message": "Digicom Media Server is running", "port": "8601", "bucket": "digicom" }

Image Operations

GET
/image/:filename
Retrieve an image from storage
Example Request:
curl https://media.digicom.com.hk/image/profile.jpg
Response:
Returns the image file with appropriate Content-Type header (jpeg, png, webp, etc.)

Video Operations

GET
/video/:filename
Retrieve a video from storage
Example Request:
curl https://media.digicom.com.hk/video/intro.mp4
Response:
Returns the video file with appropriate Content-Type header and streaming support

File Upload

POST
/upload
Upload one or multiple image/video files
Request Format (multipart/form-data):
  • files (required) - File(s) to upload
  • type (optional) - 'images' or 'videos' (default: 'images')
cURL Example:
# Upload single image curl -X POST https://media.digicom.com.hk/upload \ -F "type=images" \ -F "files=@/path/to/image.jpg" # Upload multiple files curl -X POST https://media.digicom.com.hk/upload \ -F "type=videos" \ -F "files=@/path/to/video1.mp4" \ -F "files=@/path/to/video2.mp4"
Success Response:
{ "message": "Files uploaded successfully", "files": [ { "filename": "image.jpg", "type": "images", "size": 152400 } ] }

List Files

GET
/list/:type
List all files of a specific type (images or videos)
Example Request:
curl https://media.digicom.com.hk/list/images curl https://media.digicom.com.hk/list/videos
Response:
{ "type": "images", "count": 5, "files": [ { "filename": "profile.jpg", "size": 152400, "modified": "2026-01-18T10:30:00Z" }, { "filename": "banner.png", "size": 324800, "modified": "2026-01-18T09:15:00Z" } ] }

Delete File

DELETE
/delete/:type/:filename
Remove a file from storage
Example Request:
curl -X DELETE https://media.digicom.com.hk/delete/images/profile.jpg curl -X DELETE https://media.digicom.com.hk/delete/videos/intro.mp4
Response:
{ "message": "File deleted successfully", "file": "profile.jpg" }

📁 Storage Structure

Files are organized in the digicom bucket with the following structure:

digicom/ ├── images/ │ ├── profile.jpg │ ├── banner.png │ └── ... └── videos/ ├── intro.mp4 ├── tutorial.webm └── ...

⚙️ Implementation Notes

🚀 Quick Start

1. Upload Images

curl -X POST https://media.digicom.com.hk/upload \ -F "type=images" \ -F "files=@image.jpg"

2. Retrieve Image

curl https://media.digicom.com.hk/image/image.jpg -o downloaded.jpg

3. List All Images

curl https://media.digicom.com.hk/list/images

4. Delete Image

curl -X DELETE https://media.digicom.com.hk/delete/images/image.jpg