mirror of
https://github.com/DumbWareio/DumbDrop.git
synced 2025-11-03 13:33:26 +00:00
* fix: Correct BASE_URL handling in login.html for API requests * feat(upload): Implement persistent state via metadata for resumability (#50) (#51) * feat: Enhance chunk upload functionality with configurable retry logic - Introduced MAX_RETRIES configuration to allow dynamic adjustment of retry attempts for chunk uploads. - Updated index.html to read MAX_RETRIES from server-side configuration, providing a default value if not set. - Implemented retry logic in uploadChunkWithRetry method, including exponential backoff and error handling for network issues. - Added console warnings for invalid or missing MAX_RETRIES values to improve debugging. This commit improves the robustness of file uploads by allowing configurable retry behavior, enhancing user experience during upload failures. * feat: Enhance upload functionality with metadata management and improved error handling - Introduced persistent metadata management for uploads, allowing resumability and better tracking of upload states. - Added special handling for 404 responses during chunk uploads, logging warnings and marking uploads as complete if previously finished. - Implemented metadata directory creation and validation in app.js to ensure proper upload management. - Updated upload.js to include metadata read/write functions, improving the robustness of the upload process. - Enhanced cleanup routines to handle stale metadata and incomplete uploads, ensuring a cleaner state. This commit significantly improves the upload process by adding metadata support, enhancing error handling, and ensuring better resource management during uploads. Fixes #24 * feat(footer): Add custom footer links and styles, enhance README and configuration - Introduced FOOTER_LINKS environment variable for customizable footer links in the application. - Updated index.html to render footer content dynamically based on FOOTER_LINKS. - Enhanced styles for the footer in styles.css to improve visual presentation. - Updated .env.example and README.md to document the new FOOTER_LINKS configuration and its usage. This commit enhances the user interface by allowing dynamic footer content and improves documentation for better developer understanding. * fix(footer): Correct footer content rendering logic in app.js - Initialized footerHtml variable to handle dynamic and static footer content based on the presence of custom footer links. - Updated logic to ensure that if custom links exist, they are used; otherwise, a default static link is displayed. This commit improves the footer rendering by ensuring the correct content is displayed based on configuration.
26 lines
1.8 KiB
YAML
26 lines
1.8 KiB
YAML
services:
|
|
dumbdrop:
|
|
image: dumbwareio/dumbdrop:latest
|
|
ports:
|
|
- 3000:3000
|
|
volumes:
|
|
# Replace "./local_uploads" ( before the colon ) with the path where the files land
|
|
- ./local_uploads:/app/uploads
|
|
environment: # Environment variables for the DumbDrop service
|
|
# Explicitly set upload directory inside the container
|
|
UPLOAD_DIR: /app/uploads
|
|
DUMBDROP_TITLE: DumbDrop # The title shown in the web interface
|
|
MAX_FILE_SIZE: 1024 # Maximum file size in MB
|
|
DUMBDROP_PIN: 123456 # Optional PIN protection (4-10 digits, leave empty to disable)
|
|
AUTO_UPLOAD: true # Upload without clicking button
|
|
BASE_URL: http://localhost:3000 # The base URL for the application
|
|
|
|
# Additional available environment variables (commented out with defaults)
|
|
# FOOTER_LINKS: "My Site @ https://example.com,Docs @ https://docs.example.com" # Custom footer links
|
|
# PORT: 3000 # Server port (default: 3000)
|
|
# NODE_ENV: production # Node environment (development/production)
|
|
# DEBUG: false # Debug mode for verbose logging (default: false in production, true in development)
|
|
# APPRISE_URL: "" # Apprise notification URL for upload notifications (default: none)
|
|
# APPRISE_MESSAGE: "New file uploaded - {filename} ({size}), Storage used {storage}" # Notification message template with placeholders: {filename}, {size}, {storage}
|
|
# APPRISE_SIZE_UNIT: "Auto" # Size unit for notifications (B, KB, MB, GB, TB, or Auto)
|
|
# ALLOWED_EXTENSIONS: ".jpg,.jpeg,.png,.pdf,.doc,.docx,.txt" # Comma-separated list of allowed file extensions (default: all allowed) |