mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat(server) user-defined storage structure (#1098)
[Breaking] newly uploaded file will conform to the default structure of `{uploadLocation}/{userId}/year/year-month-day/filename.ext`
This commit is contained in:
parent
391d00bcb9
commit
c754c860fd
59 changed files with 1892 additions and 173 deletions
14
mobile/openapi/lib/model/system_config_dto.dart
generated
14
mobile/openapi/lib/model/system_config_dto.dart
generated
|
|
@ -15,30 +15,36 @@ class SystemConfigDto {
|
|||
SystemConfigDto({
|
||||
required this.ffmpeg,
|
||||
required this.oauth,
|
||||
required this.storageTemplate,
|
||||
});
|
||||
|
||||
SystemConfigFFmpegDto ffmpeg;
|
||||
|
||||
SystemConfigOAuthDto oauth;
|
||||
|
||||
SystemConfigStorageTemplateDto storageTemplate;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SystemConfigDto &&
|
||||
other.ffmpeg == ffmpeg &&
|
||||
other.oauth == oauth;
|
||||
other.oauth == oauth &&
|
||||
other.storageTemplate == storageTemplate;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(ffmpeg.hashCode) +
|
||||
(oauth.hashCode);
|
||||
(oauth.hashCode) +
|
||||
(storageTemplate.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'SystemConfigDto[ffmpeg=$ffmpeg, oauth=$oauth]';
|
||||
String toString() => 'SystemConfigDto[ffmpeg=$ffmpeg, oauth=$oauth, storageTemplate=$storageTemplate]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final _json = <String, dynamic>{};
|
||||
_json[r'ffmpeg'] = ffmpeg;
|
||||
_json[r'oauth'] = oauth;
|
||||
_json[r'storageTemplate'] = storageTemplate;
|
||||
return _json;
|
||||
}
|
||||
|
||||
|
|
@ -63,6 +69,7 @@ class SystemConfigDto {
|
|||
return SystemConfigDto(
|
||||
ffmpeg: SystemConfigFFmpegDto.fromJson(json[r'ffmpeg'])!,
|
||||
oauth: SystemConfigOAuthDto.fromJson(json[r'oauth'])!,
|
||||
storageTemplate: SystemConfigStorageTemplateDto.fromJson(json[r'storageTemplate'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
|
@ -114,6 +121,7 @@ class SystemConfigDto {
|
|||
static const requiredKeys = <String>{
|
||||
'ffmpeg',
|
||||
'oauth',
|
||||
'storageTemplate',
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue