first commit

This commit is contained in:
2025-05-02 01:32:22 +03:00
commit 0311b21d23
5 changed files with 195 additions and 0 deletions

75
README.md Normal file
View File

@@ -0,0 +1,75 @@
# Minimal Chunked File Storage (PHP)
This is a minimalistic PHP-based file storage system with:
* Password-protected admin panel
* Chunked file upload for large files (GB+)
* Upload progress display
* File listing with download and delete options
* Direct link copy button
* No external libraries required
## 🚀 Features
* Chunked upload via JavaScript + `fetch`
* Server-side chunk handling and merging
* No CSS or frontend frameworks
* Fully self-contained (no Composer needed)
## 🛠 Requirements
* PHP 7.4+
* A web server (or use PHP's built-in server)
## 📁 Folder Structure
```
/simple-file-share/
├── index.php
├── upload/ # Final uploaded files
├── upload_chunks/ # Temporary chunk storage
├── upload_chunk.php
├── merge_chunks.php
└── config.php # Configuration (password and paths)
```
## 🔐 Configuration
Create `config.php`:
```php
<?php
define('PASSWORD', 'your_password_here');
define('UPLOAD_DIR', __DIR__ . '/upload/');
define('CHUNK_DIR', __DIR__ . '/upload_chunks/');
```
## ▶️ Run the Server
Use PHP's built-in server:
```bash
php -S localhost:8000
```
Then open:
```
http://localhost:8000
```
## 📤 Uploading Files
* Select a file in the UI.
* It is split into 1MB chunks (adjustable in JS).
* Upload progress is shown.
* File is merged server-side and available for download.
## 🧹 Cleanup
* Temporary chunk files are automatically deleted after merging.
* Files can be deleted via the admin interface.
## 📝 License
This project is public domain / MIT use freely.