service 2-5-26-1
This commit is contained in:
@@ -14,6 +14,9 @@ import '../../constant/api_key.dart';
|
||||
import '../../constant/box_name.dart';
|
||||
import '../../constant/colors.dart';
|
||||
import '../../main.dart';
|
||||
import 'package:service/controller/functions/encrypt_decrypt.dart';
|
||||
import 'package:service/env/env.dart';
|
||||
|
||||
|
||||
class ImageController extends GetxController {
|
||||
File? myImage;
|
||||
@@ -199,12 +202,13 @@ class ImageController extends GetxController {
|
||||
length,
|
||||
filename: basename(file.path),
|
||||
);
|
||||
String token = r(box.read(BoxName.jwt) ?? '').toString().split(Env.addd)[0];
|
||||
request.headers.addAll({
|
||||
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
||||
'Pragma': 'no-cache',
|
||||
'Expires': '0',
|
||||
'Authorization':
|
||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}',
|
||||
'Authorization': 'Bearer $token',
|
||||
'X-Device-FP': box.read(BoxName.fingerPrint)?.toString() ?? '',
|
||||
});
|
||||
// Set the file name to the driverID
|
||||
request.files.add(
|
||||
@@ -292,9 +296,10 @@ class ImageController extends GetxController {
|
||||
length,
|
||||
filename: basename(file.path),
|
||||
);
|
||||
String token = r(box.read(BoxName.jwt) ?? '').toString().split(Env.addd)[0];
|
||||
request.headers.addAll({
|
||||
'Authorization':
|
||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}',
|
||||
'Authorization': 'Bearer $token',
|
||||
'X-Device-FP': box.read(BoxName.fingerPrint)?.toString() ?? '',
|
||||
});
|
||||
// Set the file name to the driverID
|
||||
request.files.add(
|
||||
|
||||
Reference in New Issue
Block a user