diff --git a/.DS_Store b/.DS_Store index 7563a737..45ec2a2d 100644 Binary files a/.DS_Store and b/.DS_Store differ 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, }),