FiloraFS-Litev2.0.0
FiloraFS-Lite configuration
Use local defaults, then override storage, API access, upload limits, and shutdown through environment variables or an optional .env file.
Updated
Runnable local defaults
Defaults live in src/main/resources/application.properties. Spring uses spring.config.import to load the root .env file when present. No named Spring profile is required.
| Area | Default |
|---|---|
| Port | 8080 |
| Storage | ./uploads, created at startup relative to the working directory |
| Access | filorafs-local-dev-key — local development only |
| Maximum file size | 10MB |
| Maximum request size | 10MB, including multipart overhead |
| Shutdown | Graceful, with a 30s timeout per phase |
Development overrides
Copy .env.example to .env, uncomment only the values you need, and restart the application. Use deployment environment variables or a secret store outside local development.
| Variable | Spring property | Purpose |
|---|---|---|
| FILORAFS_STORAGE_PATH | filorafs.storage-path | Writable local storage directory |
| FILORAFS_API_KEY | filorafs.api-key | Replace the known development key |
| FILORAFS_MAX_FILE_SIZE | spring.servlet.multipart.max-file-size | Maximum size of one uploaded file |
| FILORAFS_MAX_REQUEST_SIZE | spring.servlet.multipart.max-request-size | Maximum multipart request size |
| SHUTDOWN_TIMEOUT | spring.lifecycle.timeout-per-shutdown-phase | Graceful shutdown timeout |
Allowed file types
FileService defines the allowlist in code; there is no file-type environment variable. Uploads must be non-empty and match the extension, declared media type, and a lightweight content signature.
- .png — image/png
- .jpg and .jpeg — image/jpeg
- .pdf — application/pdf
- .webp — image/webp
Health and shutdown
GET /actuator/health is public and exposes status only. Other Actuator endpoints and discovery are not exposed by default. Align your platform's termination grace period with SHUTDOWN_TIMEOUT.
| Property | Value |
|---|---|
| server.shutdown | graceful |
| management.endpoints.web.exposure.include | health |
| management.endpoints.web.discovery.enabled | false |
| management.endpoint.health.show-details | never |
| management.endpoint.health.show-components | never |
Before deployment
- Replace FILORAFS_API_KEY with a strong random secret; never deploy the known local key.
- Use HTTPS and appropriate network access and rate limits.
- Keep persistent storage outside source and public static-resource directories; provide backups and capacity monitoring.
- Only trusted administrators and the application should be able to modify the storage root and its ancestors.
- One shared key grants access to every file, including deletion; add ownership, quotas, retention, and malware scanning where required.