From a61bca7d8128ef3979946a653fe39a2a2a8ca718 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Tue, 25 Nov 2025 16:31:13 +0200 Subject: [PATCH] minio storage uploud fix pt7 --- .DS_Store | Bin 10244 -> 10244 bytes .../mih_business_details_services.dart | 12 +++++++----- .../mih_my_business_user_services.dart | 8 ++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.DS_Store b/.DS_Store index 7563a737d24d3a30d2186f17d6648ea12e3a18ab..45ec2a2d6de4e4ac106712741790f79f3b39d071 100644 GIT binary patch delta 32 ncmZn(XbITxSA^fh&{9Xi#MH1>N1@u%$Y3&~xX5M&(I-LxsNV^B delta 32 ncmZn(XbITxSA<{J&{Rjk*xa;MN1@u%$Y3&~xX5M&(I-Lxs5A+4 diff --git a/Frontend/lib/mih_services/mih_business_details_services.dart b/Frontend/lib/mih_services/mih_business_details_services.dart index 9240e714..f0791454 100644 --- a/Frontend/lib/mih_services/mih_business_details_services.dart +++ b/Frontend/lib/mih_services/mih_business_details_services.dart @@ -148,7 +148,7 @@ class MihBusinessDetailsServices { "Name": busineName, "type": businessType, "registration_no": businessRegistrationNo, - "logo_name": businessLogoFilename, + "logo_name": businessLogoFilename.replaceAll(RegExp(r' '), '-'), "logo_path": "", "contact_no": businessPhoneNumber, "bus_email": businessEmail, @@ -230,7 +230,8 @@ class MihBusinessDetailsServices { return const Mihloadingcircle(); }, ); - var filePath = "$business_id/business_files/$business_logo_name"; + var filePath = + "$business_id/business_files/${business_logo_name.replaceAll(RegExp(r' '), '-')}"; var response = await http.put( Uri.parse("${AppEnviroment.baseApiUrl}/business/update/v2/"), headers: { @@ -241,7 +242,7 @@ class MihBusinessDetailsServices { "Name": business_name, "type": business_type, "registration_no": business_registration_no, - "logo_name": business_logo_name, + "logo_name": business_logo_name.replaceAll(RegExp(r' '), '-'), "logo_path": filePath, "contact_no": business_phone_number, "bus_email": business_email, @@ -311,8 +312,9 @@ class MihBusinessDetailsServices { "Name": business_name, "type": business_type, "registration_no": business_registration_no, - "logo_name": business_logo_name, - "logo_path": "$business_id/business_files/$business_logo_name", + "logo_name": business_logo_name.replaceAll(RegExp(r' '), '-'), + "logo_path": + "$business_id/business_files/${business_logo_name.replaceAll(RegExp(r' '), '-')}", "contact_no": business_phone_number, "bus_email": business_email, "gps_location": business_location, diff --git a/Frontend/lib/mih_services/mih_my_business_user_services.dart b/Frontend/lib/mih_services/mih_my_business_user_services.dart index 286de533..f03155bf 100644 --- a/Frontend/lib/mih_services/mih_my_business_user_services.dart +++ b/Frontend/lib/mih_services/mih_my_business_user_services.dart @@ -56,8 +56,8 @@ class MihMyBusinessUserServices { body: jsonEncode({ "business_id": business_id, "app_id": app_id, - "signature": signatureFilename, - "sig_path": sigPath, + "signature": signatureFilename.replaceAll(RegExp(r' '), '-'), + "sig_path": sigPath.replaceAll(RegExp(r' '), '-'), "title": title, "access": access, }), @@ -100,8 +100,8 @@ class MihMyBusinessUserServices { body: jsonEncode({ "business_id": business_id, "app_id": app_id, - "signature": signatureFileName, - "sig_path": filePath, + "signature": signatureFileName.replaceAll(RegExp(r' '), '-'), + "sig_path": filePath.replaceAll(RegExp(r' '), '-'), "title": bUserTitle, "access": bUserAccess, }),