ESP8266/ESP32 lightweight web-based file manager, media server and LittleFS storage system with upload, delete and direct file access.
Lightweight Web File Manager + Media Server + Mini CDN for ESP8266 / ESP32
ViraMediaWeb transforms your ESP8266/ESP32 into a powerful embedded web storage system.
It works like a mini cloud server directly on your microcontroller.
http://ip/vfm)Access via browser:
http://DEVICE_IP/vfm
ESP8266 / ESP32
β File System Layer (LittleFS / SPIFFS)
β Async HTTP Server Engine
β ViraMediaWeb UI Core
β REST API Gateway
β Client Browser / External Apps
Copy this repository into:
Documents/Arduino/libraries/ViraMediaWeb
Install these libraries:
Main library class for managing web-based media services.
ViraMediaWeb media;
Initialize ViraMediaWeb and LittleFS filesystem.
bool begin();
if(!media.begin()){
Serial.println("Media Init Failed");
}
Attach ViraMediaWeb to AsyncWebServer.
void attach(AsyncWebServer &server);
AsyncWebServer server(80);
media.attach(server);
/upload
/files
/storage
/delete
/vfm
Main loop handler.
void handle();
void loop(){
media.handle();
}
Filesystem management based on LittleFS.
begin()
bool begin();
Open a file.
File open(
const String &path,
const char *mode
);
Check if a file exists.
bool exists(
const String &path
);
Delete a file.
bool remove(
const String &path
);
Rename a file.
bool rename(
const String &oldName,
const String &newName
);
Create a directory.
bool mkdir(
const String &path
);
Remove a directory.
bool rmdir(
const String &path
);
Check if path is a file.
bool isFile(
const String &path
);
Check if path is a directory.
bool isDirectory(
const String &path
);
Get file size.
size_t fileSize(
const String &path
);
uint32_t totalBytes();
uint32_t usedBytes();
uint32_t freeBytes();
Normalize filesystem path.
String normalizePath(
const String &path
);
File upload management.
Enable upload service.
void attach(
AsyncWebServer *server,
ViraFileSystem *fs
);
POST /upload
multipart/form-data
File browser and gallery service.
Enable gallery services.
void attach(
AsyncWebServer *server,
ViraFileSystem *fs
);
GET /files
Returns file list in JSON format.
GET /storage
Returns:
{
"total":4096000,
"used":12000,
"free":4084000
}
GET /search?q=file
Search files by name.
GET /delete?name=file.jpg
Delete selected file.
Built-in ViraMediaWeb File Manager interface.
Enable Web UI.
void attach(
AsyncWebServer *server
);
http://device-ip/vfm
#include <WiFi.h>
#include <ESPAsyncWebServer.h>
#include <ViraMediaWeb.h>
AsyncWebServer server(80);
ViraMediaWeb media;
void setup() {
Serial.begin(115200);
WiFi.begin("SSID", "PASSWORD");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
}
Serial.println(WiFi.localIP());
media.begin();
media.attach(server);
server.begin();
}
void loop() {
}
/
Main System Web UI (your custom ESP application interface)
/vfm
ViraMediaWeb File Manager Dashboard
(File upload, delete, preview and storage management)
π Dashboard (File Manager UI) will load automatically.
π API Endpoints
| Route | Method | Description |
|---|---|---|
| / | GET | System Web UI |
| /vfm | GET | Web UI File Manager Dashboard |
| /upload | POST | Upload file |
| /files | GET | List files |
| /delete?name= | GET | Delete file |
| /storage | GET | Storage info |
π‘ Use Cases
Smart IoT dashboards
Local network file sharing
Embedded media server
ESP-based mini cloud storage
Industrial monitoring systems
Smart home file interface
π₯ Web UI Features
β File upload panel
β Storage usage monitor
β File list viewer
β Image thumbnails
β Delete button
β View/Open file in new tab
β Drag & Drop upload support
β‘ Example Workflow
Connect ESP to WiFi
Open IP in browser
Upload files via web UI
Access files via URL
Use API in your own projects
You can use uploaded files inside your own website:
<img src="http://DEVICE_IP/logo.png" />
<script>
fetch("http://DEVICE_IP/files")
.then(r => r.json())
.then(data => console.log(data));
</script>
Fully async architecture (no blocking server calls)
Designed for low memory microcontrollers
Optimized for LAN usage
Works as embedded HTTP file server
Mostafa Mir Mousavi (viramedar)
Embedded Systems | Network Engineering | IoT Development | Infrastructure Design
MIT License
Turn your ESP device into a smart web storage node inside your network