mirror of
https://github.com/mattintech/simplefileupload-server.git
synced 2026-07-11 10:41:54 +00:00
- Store client key in SQLite database instead of environment variable - Add database migration from CLIENT_KEY environment variable to preserve existing keys - Add admin UI with tabbed interface (Configuration and QR Code tabs) - Implement QR code generation containing server config (address, port, key) for Android app - Add functionality to regenerate client key with warning dialog - Add buttons to download QR code as PNG and copy QR image to clipboard - Add manual input fields for server address and port configuration - Update requirements.txt with pyotp and qrcode dependencies
46 lines
932 B
Python
46 lines
932 B
Python
from .file_metadata import FileMetadata
|
|
|
|
# Database initialization
|
|
from .database import init_db, get_db_connection, migrate_from_json, migrate_client_key_to_db
|
|
|
|
# Admin model functions
|
|
from .admin_model import (
|
|
get_admin,
|
|
create_admin,
|
|
admin_exists as model_admin_exists,
|
|
update_last_login
|
|
)
|
|
|
|
# File model functions
|
|
from .file_model import (
|
|
create_file,
|
|
get_file,
|
|
increment_download,
|
|
delete_file as model_delete_file,
|
|
get_expired_files,
|
|
cleanup_expired,
|
|
get_all_files
|
|
)
|
|
|
|
# Chunk model functions
|
|
from .chunk_model import (
|
|
create_session,
|
|
get_session,
|
|
add_chunk,
|
|
get_received_chunks,
|
|
delete_session,
|
|
get_abandoned_sessions,
|
|
cleanup_abandoned,
|
|
update_received_chunks
|
|
)
|
|
|
|
# Config model functions
|
|
from .config_model import (
|
|
get_config,
|
|
get_client_key,
|
|
init_config,
|
|
update_server_address,
|
|
update_server_port,
|
|
regenerate_client_key
|
|
)
|