Skip to content

Commit 80c2e8b

Browse files
committed
Merge branch 'master' of github.com:RealTeamRocket/rocket-app
2 parents 2621248 + 18bb64b commit 80c2e8b

File tree

5 files changed

+31
-25
lines changed

5 files changed

+31
-25
lines changed

mobile_app/ios/Podfile.lock

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
PODS:
22
- Alamofire (5.10.2)
3-
- background_fetch (1.3.8):
4-
- Flutter
53
- Flutter (1.0.0)
4+
- flutter_foreground_task (0.0.1):
5+
- Flutter
66
- flutter_osm_plugin (0.0.1):
77
- Alamofire
88
- Flutter
@@ -14,6 +14,8 @@ PODS:
1414
- geolocator_apple (1.2.0):
1515
- Flutter
1616
- FlutterMacOS
17+
- image_picker_ios (0.0.1):
18+
- Flutter
1719
- location (0.0.1):
1820
- Flutter
1921
- OSMFlutterFramework (0.8.2)
@@ -33,11 +35,12 @@ PODS:
3335
- Yams (5.0.6)
3436

3537
DEPENDENCIES:
36-
- background_fetch (from `.symlinks/plugins/background_fetch/ios`)
3738
- Flutter (from `Flutter`)
39+
- flutter_foreground_task (from `.symlinks/plugins/flutter_foreground_task/ios`)
3840
- flutter_osm_plugin (from `.symlinks/plugins/flutter_osm_plugin/ios`)
3941
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
4042
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/darwin`)
43+
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
4144
- location (from `.symlinks/plugins/location/ios`)
4245
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
4346
- pedometer (from `.symlinks/plugins/pedometer/ios`)
@@ -53,16 +56,18 @@ SPEC REPOS:
5356
- Yams
5457

5558
EXTERNAL SOURCES:
56-
background_fetch:
57-
:path: ".symlinks/plugins/background_fetch/ios"
5859
Flutter:
5960
:path: Flutter
61+
flutter_foreground_task:
62+
:path: ".symlinks/plugins/flutter_foreground_task/ios"
6063
flutter_osm_plugin:
6164
:path: ".symlinks/plugins/flutter_osm_plugin/ios"
6265
flutter_secure_storage:
6366
:path: ".symlinks/plugins/flutter_secure_storage/ios"
6467
geolocator_apple:
6568
:path: ".symlinks/plugins/geolocator_apple/darwin"
69+
image_picker_ios:
70+
:path: ".symlinks/plugins/image_picker_ios/ios"
6671
location:
6772
:path: ".symlinks/plugins/location/ios"
6873
path_provider_foundation:
@@ -78,11 +83,12 @@ EXTERNAL SOURCES:
7883

7984
SPEC CHECKSUMS:
8085
Alamofire: 7193b3b92c74a07f85569e1a6c4f4237291e7496
81-
background_fetch: 851122c99dc3f25a011a6aebec5379ccdf4ab5eb
8286
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
87+
flutter_foreground_task: a159d2c2173b33699ddb3e6c2a067045d7cebb89
8388
flutter_osm_plugin: 3fb57665b32a81fcffa57c6206658d3a0d0d1a96
8489
flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13
8590
geolocator_apple: ab36aa0e8b7d7a2d7639b3b4e48308394e8cef5e
91+
image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a
8692
location: 155caecf9da4f280ab5fe4a55f94ceccfab838f8
8793
OSMFlutterFramework: f36e9c16bcadaf99d9edd4c46c25c00aeaceb975
8894
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564

mobile_app/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@
216216
isa = PBXProject;
217217
attributes = {
218218
BuildIndependentTargetsInParallel = YES;
219-
LastUpgradeCheck = 1630;
219+
LastUpgradeCheck = 1510;
220220
ORGANIZATIONNAME = "";
221221
TargetAttributes = {
222222
331C8080294A63A400263BE5 = {
@@ -300,14 +300,10 @@
300300
inputFileListPaths = (
301301
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
302302
);
303-
inputPaths = (
304-
);
305303
name = "[CP] Embed Pods Frameworks";
306304
outputFileListPaths = (
307305
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
308306
);
309-
outputPaths = (
310-
);
311307
runOnlyForDeploymentPostprocessing = 0;
312308
shellPath = /bin/sh;
313309
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
@@ -359,14 +355,10 @@
359355
inputFileListPaths = (
360356
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
361357
);
362-
inputPaths = (
363-
);
364358
name = "[CP] Copy Pods Resources";
365359
outputFileListPaths = (
366360
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
367361
);
368-
outputPaths = (
369-
);
370362
runOnlyForDeploymentPostprocessing = 0;
371363
shellPath = /bin/sh;
372364
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";

mobile_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1630"
3+
LastUpgradeVersion = "1510"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

mobile_app/lib/utils/backend_api/settings_api.dart

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'dart:convert';
22
import 'dart:io';
3-
4-
3+
import 'package:flutter_dotenv/flutter_dotenv.dart';
4+
import 'package:http/http.dart' as http;
55
import 'base_api.dart';
66

77
class SettingsResponse {
@@ -59,15 +59,21 @@ class SettingsApi {
5959
}
6060

6161
static Future<void> updateImage(String jwt, File imageFile) async {
62-
final response = await BaseApi.postMultipart(
63-
'/api/v1/protected/settings/image',
64-
headers: {'Authorization': 'Bearer $jwt'},
65-
file: imageFile,
66-
fileFieldName: 'image',
67-
);
62+
final String backendUrl = dotenv.get('BACKEND_URL', fallback: "http://10.0.2.2:8080");
63+
final uri = Uri.parse('$backendUrl/v1/protected/settings/image');
64+
String apiKey = dotenv.get('API_KEY', fallback: "default-api-key");
65+
final request = http.MultipartRequest('POST', uri)
66+
..headers['Authorization'] = 'Bearer $jwt'
67+
..headers['X-API-KEY'] = apiKey
68+
..files.add(await http.MultipartFile.fromPath('image', imageFile.path));
69+
70+
final streamedResponse = await request.send();
71+
final response = await http.Response.fromStream(streamedResponse);
6872

6973
if (response.statusCode != 200) {
70-
throw Exception('Failed to update image');
74+
print('Upload fehlgeschlagen: ${response.statusCode}');
75+
print('Fehlerantwort: ${response.body}');
76+
throw Exception('Image upload failed');
7177
}
7278
}
7379
}

nginx-reverse.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ server {
1111
ssl_certificate /etc/letsencrypt/live/rocket-app.social/fullchain.pem;
1212
ssl_certificate_key /etc/letsencrypt/live/rocket-app.social/privkey.pem;
1313

14+
client_max_body_size 10M;
15+
1416
# Forward API requests to backend (with WebSocket support)
1517
location /api/v1/ {
1618
proxy_pass http://backend:8080/api/v1/;

0 commit comments

Comments
 (0)