mirror of https://github.com/immich-app/immich.git
Get thumbnail from app (#68)
* Renamed multipart filed name 'files' to 'assetData'. * Added an additional field name of 'thumbnailData' to multipart form. * Implemented upload mechanism for thumbnail directly from the mobile client. * Removed dead code * Implemented a version checking mechanism.pull/72/head
parent
be72df70fe
commit
e407a4fa13
@ -0,0 +1 @@
|
|||||||
|
.DS_Store
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
# Deployment checklist for iOS/Android/Server
|
||||||
|
|
||||||
|
[] Up version in [mobile/pubspec.yml](/mobile/pubspec.yaml)
|
||||||
|
|
||||||
|
[] Up version in [docker/docker-compose.yml](/docker/docker-compose.yml) for `immich_server` service
|
||||||
|
|
||||||
|
[] Up version in [docker/docker-compose.gpu.yml](/docker/docker-compose.gpu.yml) for `immich_server` service
|
||||||
|
|
||||||
|
[] Up version in [server/src/constants/server_version.constant.ts](/server/src/constants/server_version.constant.ts)
|
||||||
|
|
||||||
|
[] Up version in iOS Fastlane [/mobile/ios/fastlane/Fastfile](/mobile/ios/fastlane/Fastfile)
|
||||||
|
|
||||||
|
All of the version should be the same.
|
||||||
@ -0,0 +1,78 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:immich_mobile/shared/models/mapbox_info.model.dart';
|
||||||
|
import 'package:immich_mobile/shared/models/server_version.model.dart';
|
||||||
|
|
||||||
|
class ServerInfoState {
|
||||||
|
final MapboxInfo mapboxInfo;
|
||||||
|
final ServerVersion serverVersion;
|
||||||
|
final bool isVersionMismatch;
|
||||||
|
final String versionMismatchErrorMessage;
|
||||||
|
|
||||||
|
ServerInfoState({
|
||||||
|
required this.mapboxInfo,
|
||||||
|
required this.serverVersion,
|
||||||
|
required this.isVersionMismatch,
|
||||||
|
required this.versionMismatchErrorMessage,
|
||||||
|
});
|
||||||
|
|
||||||
|
ServerInfoState copyWith({
|
||||||
|
MapboxInfo? mapboxInfo,
|
||||||
|
ServerVersion? serverVersion,
|
||||||
|
bool? isVersionMismatch,
|
||||||
|
String? versionMismatchErrorMessage,
|
||||||
|
}) {
|
||||||
|
return ServerInfoState(
|
||||||
|
mapboxInfo: mapboxInfo ?? this.mapboxInfo,
|
||||||
|
serverVersion: serverVersion ?? this.serverVersion,
|
||||||
|
isVersionMismatch: isVersionMismatch ?? this.isVersionMismatch,
|
||||||
|
versionMismatchErrorMessage: versionMismatchErrorMessage ?? this.versionMismatchErrorMessage,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toMap() {
|
||||||
|
return {
|
||||||
|
'mapboxInfo': mapboxInfo.toMap(),
|
||||||
|
'serverVersion': serverVersion.toMap(),
|
||||||
|
'isVersionMismatch': isVersionMismatch,
|
||||||
|
'versionMismatchErrorMessage': versionMismatchErrorMessage,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
factory ServerInfoState.fromMap(Map<String, dynamic> map) {
|
||||||
|
return ServerInfoState(
|
||||||
|
mapboxInfo: MapboxInfo.fromMap(map['mapboxInfo']),
|
||||||
|
serverVersion: ServerVersion.fromMap(map['serverVersion']),
|
||||||
|
isVersionMismatch: map['isVersionMismatch'] ?? false,
|
||||||
|
versionMismatchErrorMessage: map['versionMismatchErrorMessage'] ?? '',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
String toJson() => json.encode(toMap());
|
||||||
|
|
||||||
|
factory ServerInfoState.fromJson(String source) => ServerInfoState.fromMap(json.decode(source));
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ServerInfoState(mapboxInfo: $mapboxInfo, serverVersion: $serverVersion, isVersionMismatch: $isVersionMismatch, versionMismatchErrorMessage: $versionMismatchErrorMessage)';
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(this, other)) return true;
|
||||||
|
|
||||||
|
return other is ServerInfoState &&
|
||||||
|
other.mapboxInfo == mapboxInfo &&
|
||||||
|
other.serverVersion == serverVersion &&
|
||||||
|
other.isVersionMismatch == isVersionMismatch &&
|
||||||
|
other.versionMismatchErrorMessage == versionMismatchErrorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return mapboxInfo.hashCode ^
|
||||||
|
serverVersion.hashCode ^
|
||||||
|
isVersionMismatch.hashCode ^
|
||||||
|
versionMismatchErrorMessage.hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
class ServerVersion {
|
||||||
|
final int major;
|
||||||
|
final int minor;
|
||||||
|
final int patch;
|
||||||
|
final int build;
|
||||||
|
|
||||||
|
ServerVersion({
|
||||||
|
required this.major,
|
||||||
|
required this.minor,
|
||||||
|
required this.patch,
|
||||||
|
required this.build,
|
||||||
|
});
|
||||||
|
|
||||||
|
ServerVersion copyWith({
|
||||||
|
int? major,
|
||||||
|
int? minor,
|
||||||
|
int? patch,
|
||||||
|
int? build,
|
||||||
|
}) {
|
||||||
|
return ServerVersion(
|
||||||
|
major: major ?? this.major,
|
||||||
|
minor: minor ?? this.minor,
|
||||||
|
patch: patch ?? this.patch,
|
||||||
|
build: build ?? this.build,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toMap() {
|
||||||
|
return {
|
||||||
|
'major': major,
|
||||||
|
'minor': minor,
|
||||||
|
'patch': patch,
|
||||||
|
'build': build,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
factory ServerVersion.fromMap(Map<String, dynamic> map) {
|
||||||
|
return ServerVersion(
|
||||||
|
major: map['major']?.toInt() ?? 0,
|
||||||
|
minor: map['minor']?.toInt() ?? 0,
|
||||||
|
patch: map['patch']?.toInt() ?? 0,
|
||||||
|
build: map['build']?.toInt() ?? 0,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
String toJson() => json.encode(toMap());
|
||||||
|
|
||||||
|
factory ServerVersion.fromJson(String source) => ServerVersion.fromMap(json.decode(source));
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ServerVersion(major: $major, minor: $minor, patch: $patch, build: $build)';
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(this, other)) return true;
|
||||||
|
|
||||||
|
return other is ServerVersion &&
|
||||||
|
other.major == major &&
|
||||||
|
other.minor == minor &&
|
||||||
|
other.patch == patch &&
|
||||||
|
other.build == build;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return major.hashCode ^ minor.hashCode ^ patch.hashCode ^ build.hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
// major.minor.patch+build
|
||||||
|
// check mobile/pubspec.yml for current release version
|
||||||
|
|
||||||
|
export const serverVersion = {
|
||||||
|
major: 1,
|
||||||
|
minor: 3,
|
||||||
|
patch: 0,
|
||||||
|
build: 0,
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue