From c07d4e0bddf3b2e37d934a629a3cdac1307bbf9a Mon Sep 17 00:00:00 2001 From: AIIrondev Date: Sun, 9 Aug 2026 23:59:13 +0200 Subject: [PATCH] Changes to match the designated endpoint of the user when uploading an Item to dont have the system Jump between the systems. --- Web/app.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Web/app.py b/Web/app.py index b5fa923..c6482e6 100755 --- a/Web/app.py +++ b/Web/app.py @@ -5177,17 +5177,13 @@ def upload_item(): fs = get_gridfs() - can_access_admin_home = _page_access_allowed(permissions, 'home_admin') and _action_access_allowed(permissions, 'can_manage_settings') - if can_access_admin_home: - success_redirect_endpoint = 'home_admin' - elif cfg.MODULES.is_enabled('library') and _page_access_allowed(permissions, 'home_library'): - success_redirect_endpoint = 'home_library' + if cfg.MODULES.is_enabled('library') and sanitize_form_value(request.form.get('item_type_input', '')) != "other": + success_redirect_endpoint = 'library' else: success_redirect_endpoint = 'home_admin' # Detect if request is from mobile device is_mobile = 'Mobile' in request.headers.get('User-Agent', '') - is_ios = 'iPhone' in request.headers.get('User-Agent', '') or 'iPad' in request.headers.get('User-Agent', '') # Log mobile request for debugging if is_mobile: