You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-06-22 04:28:11 +02:00
Add information for uploading asset and error indication with error message for each failed upload. (#315)
* Added info box * Fixed upload endpoint doesn't report error status code * Added chip to show update error * Added chip to show failed upload * Add duplication check for upload * Better duplication-checking placement * Remove check for duplicated asset * Added failed backup status route * added page * Display error card with thumbnail * Improved styling * Set thumbnail with better quality * Remove force upload error
This commit is contained in:
@ -0,0 +1,53 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:photo_manager/photo_manager.dart';
|
||||
|
||||
class ErrorUploadAsset extends Equatable {
|
||||
final String id;
|
||||
final DateTime createdAt;
|
||||
final String fileName;
|
||||
final String fileType;
|
||||
final AssetEntity asset;
|
||||
final String errorMessage;
|
||||
|
||||
const ErrorUploadAsset({
|
||||
required this.id,
|
||||
required this.createdAt,
|
||||
required this.fileName,
|
||||
required this.fileType,
|
||||
required this.asset,
|
||||
required this.errorMessage,
|
||||
});
|
||||
|
||||
ErrorUploadAsset copyWith({
|
||||
String? id,
|
||||
DateTime? createdAt,
|
||||
String? fileName,
|
||||
String? fileType,
|
||||
AssetEntity? asset,
|
||||
String? errorMessage,
|
||||
}) {
|
||||
return ErrorUploadAsset(
|
||||
id: id ?? this.id,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
fileName: fileName ?? this.fileName,
|
||||
fileType: fileType ?? this.fileType,
|
||||
asset: asset ?? this.asset,
|
||||
errorMessage: errorMessage ?? this.errorMessage,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ErrorUploadAsset(id: $id, createdAt: $createdAt, fileName: $fileName, fileType: $fileType, asset: $asset, errorMessage: $errorMessage)';
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object> get props {
|
||||
return [
|
||||
id,
|
||||
fileName,
|
||||
fileType,
|
||||
errorMessage,
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user