diff --git a/README.md b/README.md index ef44083..e32cfa2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ https://github.com/user-attachments/assets/179e6940-5798-4482-9a69-696f806c37de changelogs available here: -Multi File Upload Editor is a lightweight, secure web application for uploading, editing, and managing files. It’s built with an Apache/PHP backend and a modern JavaScript frontend (ES6 modules) to provide a responsive, dynamic file management interface. The application is ideal for scenarios like document management, image galleries, firmware file hosting, or any situation where multiple files need to be uploaded and organized through a web interface. +Multi File Upload Editor is a lightweight, secure, self-hosted web application for uploading, editing, and managing files. Built with an Apache/PHP backend and a modern JavaScript (ES6 modules) frontend, it offers a responsive, dynamic file management interface. It serves as an alternative to solutions like FileGator or ProjectSend, providing an easy-to-setup experience ideal for document management, image galleries, firmware file hosting, and more. --- @@ -97,22 +97,167 @@ Multi File Upload Editor is a lightweight, secure web application for uploading, **Dark mode** ![Dark Mode](https://raw.githubusercontent.com/error311/multi-file-upload-editor/refs/heads/master/resources/dark-mode.png) -![dark-editor](https://raw.githubusercontent.com/error311/multi-file-upload-editor/refs/heads/master/resources/dark-editor.png) -![dark-preview](https://raw.githubusercontent.com/error311/multi-file-upload-editor/refs/heads/master/resources/dark-preview.png) -![light-downloadzip](https://raw.githubusercontent.com/error311/multi-file-upload-editor/refs/heads/master/resources/light-downloadzip.png) +**Dark editor** +![dark-editor](https://raw.githubusercontent.com/error311/multi-file-upload-editor/refs/heads/master/resources/dark-editor.png) + +**Dark preview** +![dark-preview](https://raw.githubusercontent.com/error311/multi-file-upload-editor/refs/heads/master/resources/dark-preview.png) + +**Restore or Delete Trash** +![restore-delete](https://raw.githubusercontent.com/error311/multi-file-upload-editor/refs/heads/master/resources/restore-delete.png) + +**Login page** ![Login](https://raw.githubusercontent.com/error311/multi-file-upload-editor/refs/heads/master/resources/login-page.png) - **iphone:** + **iphone screenshots:**

-based off of: - +--- -## Prerequisites +## Installation & Setup -- Apache2, configured, up and running -- PHP 8.1 or higher -- Required PHP extensions: `php-json`, `php-curl`, `php-zip` +### Manual Installation + +1. **Clone or Download the Repository:** + - **Clone:** + + ```bash + git clone https://github.com/error311/multi-file-upload-editor.git + ``` + + - **Download:** + Download the latest release from the GitHub releases page and extract it into your desired directory. + +2. **Deploy to Your Web Server:** + - Place the project files in your Apache web directory (e.g., `/var/www/html`). + - Ensure PHP 8.1+ is installed along with the required extensions (php-json, php-curl, php-zip, etc.). + +3. **Directory Setup & Permissions:** + - Create the following directories if they do not exist, and set appropriate permissions: + - `uploads/` – for file storage. + - `users/` – to store `users.txt` (user authentication data). + - `metadata/` – for storing `file_metadata.json` and other metadata. + - Example commands: + + ```bash + mkdir -p /var/www/uploads /var/www/users /var/www/metadata + chmod -R 775 /var/www/uploads /var/www/users /var/www/metadata + ``` + +4. **Configure Apache:** + - Ensure that directory indexing is disabled (using `Options -Indexes` in your `.htaccess` or Apache configuration). + - Make sure the Apache configuration allows URL rewriting if needed. + +5. **Configuration File:** + - Open `config.php` and adjust the following constants as necessary: + - `BASE_URL`: Set this to your web app’s base URL. + - `UPLOAD_DIR`: Adjust the directory path for uploads. + - `TIMEZONE`: Set to your preferred timezone. + - `TOTAL_UPLOAD_SIZE`: Ensure it matches PHP’s `upload_max_filesize` and `post_max_size` settings in your `php.ini`. + +### Initial Setup Instructions + +- **First Launch Admin Setup:** + On first launch, if no users exist, the application will enter a setup mode. You will be prompted to create an admin user. This is handled automatically by the application (e.g., via a “Create Admin” form). + **Note:** No default credentials are provided. You must create the first admin account to log in and manage additional users. + +--- + +## Docker Usage + +For users who prefer containerization, a Docker image is available + +### Quickstart + +1. **Pull the Docker Image:** + + ```bash + docker pull error311/multi-file-upload-editor-docker:latest + ``` + +2. **Run the Container:** + + ```bash + docker run -d \ + -p 80:80 \ + -e TIMEZONE="America/New_York" \ + -e TOTAL_UPLOAD_SIZE="5G" \ + -e SECURE="false" \ + -v /path/to/your/uploads:/var/www/uploads \ + -v /path/to/your/users:/var/www/users \ + -v /path/to/your/metadata:/var/www/metadata \ + --name multi-file-upload-editor \ + error311/multi-file-upload-editor-docker:latest + ``` + +3. **Using Docker Compose:** + + Create a docker-compose.yml file with the following content: + + ```yaml + version: "3.8" + services: + web: + image: error311/multi-file-upload-editor-docker:latest + ports: + - "80:80" + environment: + TIMEZONE: "America/New_York" + TOTAL_UPLOAD_SIZE: "5G" + SECURE: "false" + volumes: + - /path/to/your/uploads:/var/www/uploads + - /path/to/your/users:/var/www/users + - /path/to/your/metadata:/var/www/metadata + ``` + +**Then start the container with:** + + ```bash + docker-compose up -d + ``` + +--- + +## Configuration Guidance + +The `config.php` file contains several key constants that may need adjustment for your deployment: + +- **BASE_URL:** + Set to the URL where your application is hosted (e.g., `http://yourdomain.com/uploads/`). + +- **UPLOAD_DIR, USERS_DIR, META_DIR:** + Define the directories for uploads, user data, and metadata. Adjust these to match your server environment or Docker volume mounts. + +- **TIMEZONE & DATE_TIME_FORMAT:** + Set according to your regional settings. + +- **TOTAL_UPLOAD_SIZE:** + Defines the maximum upload size (default is `5G`). Ensure that PHP’s `upload_max_filesize` and `post_max_size` in your `php.ini` are consistent with this setting. The startup script (`start.sh`) updates PHP limits at runtime based on this value. + +- **Environment Variables (Docker):** + The Docker image supports overriding configuration via environment variables. For example, you can set `SECURE`, `SHARE_URL`, and port settings via the container’s environment. + +--- + +## SEO & Documentation + +Multi File Upload Editor is not only powerful but also optimized for discoverability. The README is indexed by search engines, so including keywords like “self-hosted file manager,” “PHP upload,” and comparisons to other solutions (e.g., FileGator, ProjectSend) can help users find this project online. This documentation provides a comprehensive overview—from features and installation instructions to configuration guidance—making it easier for potential users to deploy and customize the application. + +--- + +## Additional Information + +- **Security:** + All state-changing endpoints use CSRF token validation. Ensure that sessions and tokens are correctly configured as per your deployment environment. + +- **Permissions:** + Both manual and Docker installations include steps to ensure that file and directory permissions are set correctly for the web server to read and write as needed. + +- **Logging & Troubleshooting:** + Check Apache logs (located in `/var/log/apache2/`) for troubleshooting any issues during deployment or operation. + +Enjoy using the Multi File Upload Editor! For any issues or contributions, please refer to the [GitHub repository](https://github.com/error311/multi-file-upload-editor). diff --git a/index.html b/index.html index 3b29e1b..113daee 100644 --- a/index.html +++ b/index.html @@ -147,7 +147,7 @@
-
+
@@ -174,7 +174,7 @@
-
+
Folder Navigation & Management diff --git a/resources/create-folder.png b/resources/create-folder.png deleted file mode 100644 index 794b5ae..0000000 Binary files a/resources/create-folder.png and /dev/null differ diff --git a/resources/create-user.png b/resources/create-user.png deleted file mode 100644 index 6fab62c..0000000 Binary files a/resources/create-user.png and /dev/null differ diff --git a/resources/dark-editor.png b/resources/dark-editor.png index 1487c1c..1e50eba 100644 Binary files a/resources/dark-editor.png and b/resources/dark-editor.png differ diff --git a/resources/dark-iphone.png b/resources/dark-iphone.png deleted file mode 100644 index 1db6dc7..0000000 Binary files a/resources/dark-iphone.png and /dev/null differ diff --git a/resources/dark-mode.png b/resources/dark-mode.png index c4ae767..0f1e9fa 100644 Binary files a/resources/dark-mode.png and b/resources/dark-mode.png differ diff --git a/resources/dark-preview-iphone.png b/resources/dark-preview-iphone.png deleted file mode 100644 index e0c9ec1..0000000 Binary files a/resources/dark-preview-iphone.png and /dev/null differ diff --git a/resources/dark-preview.png b/resources/dark-preview.png index e4281ee..6793834 100644 Binary files a/resources/dark-preview.png and b/resources/dark-preview.png differ diff --git a/resources/delete-folder.png b/resources/delete-folder.png deleted file mode 100644 index 10b21f9..0000000 Binary files a/resources/delete-folder.png and /dev/null differ diff --git a/resources/edit-larger-window.png b/resources/edit-larger-window.png deleted file mode 100644 index 347a0e4..0000000 Binary files a/resources/edit-larger-window.png and /dev/null differ diff --git a/resources/edit-small-window.png b/resources/edit-small-window.png deleted file mode 100644 index e8e381d..0000000 Binary files a/resources/edit-small-window.png and /dev/null differ diff --git a/resources/light-downloadzip.png b/resources/light-downloadzip.png deleted file mode 100644 index 283d445..0000000 Binary files a/resources/light-downloadzip.png and /dev/null differ diff --git a/resources/light-mode.png b/resources/light-mode.png index 657d893..342ff8d 100644 Binary files a/resources/light-mode.png and b/resources/light-mode.png differ diff --git a/resources/light-preview-iphone.png b/resources/light-preview-iphone.png deleted file mode 100644 index 00d8775..0000000 Binary files a/resources/light-preview-iphone.png and /dev/null differ diff --git a/resources/login-page.png b/resources/login-page.png index 9b564c1..d5c4bec 100644 Binary files a/resources/login-page.png and b/resources/login-page.png differ diff --git a/resources/main-screen.png b/resources/main-screen.png deleted file mode 100644 index 1352caa..0000000 Binary files a/resources/main-screen.png and /dev/null differ diff --git a/resources/move-selected.png b/resources/move-selected.png deleted file mode 100644 index 9d9ea6b..0000000 Binary files a/resources/move-selected.png and /dev/null differ diff --git a/resources/multi-upload.png b/resources/multi-upload.png deleted file mode 100644 index 5c925b4..0000000 Binary files a/resources/multi-upload.png and /dev/null differ diff --git a/resources/restore-delete.png b/resources/restore-delete.png new file mode 100644 index 0000000..b5f7cbc Binary files /dev/null and b/resources/restore-delete.png differ diff --git a/styles.css b/styles.css index 08abd13..898f37f 100644 --- a/styles.css +++ b/styles.css @@ -47,6 +47,9 @@ body { /************************************************************/ /* FLEXBOX HEADER: LOGO, TITLE, BUTTONS FIXED */ /************************************************************/ +#uploadCard, #folderManagementCard { + min-height: 342px; +} .btn-login { margin-top: 10px;