mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
Fixed issue with video upload timeout and upper case file type on ios
This commit is contained in:
parent
69ed287974
commit
ca0feb8c8d
4 changed files with 24 additions and 9 deletions
|
|
@ -17,6 +17,10 @@ PODS:
|
||||||
- Flutter
|
- Flutter
|
||||||
- FMDB (>= 2.7.5)
|
- FMDB (>= 2.7.5)
|
||||||
- Toast (4.0.0)
|
- Toast (4.0.0)
|
||||||
|
- video_player_avfoundation (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- wakelock (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
||||||
|
|
@ -25,6 +29,8 @@ DEPENDENCIES:
|
||||||
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
|
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
|
||||||
- photo_manager (from `.symlinks/plugins/photo_manager/ios`)
|
- photo_manager (from `.symlinks/plugins/photo_manager/ios`)
|
||||||
- sqflite (from `.symlinks/plugins/sqflite/ios`)
|
- sqflite (from `.symlinks/plugins/sqflite/ios`)
|
||||||
|
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/ios`)
|
||||||
|
- wakelock (from `.symlinks/plugins/wakelock/ios`)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
trunk:
|
trunk:
|
||||||
|
|
@ -44,6 +50,10 @@ EXTERNAL SOURCES:
|
||||||
:path: ".symlinks/plugins/photo_manager/ios"
|
:path: ".symlinks/plugins/photo_manager/ios"
|
||||||
sqflite:
|
sqflite:
|
||||||
:path: ".symlinks/plugins/sqflite/ios"
|
:path: ".symlinks/plugins/sqflite/ios"
|
||||||
|
video_player_avfoundation:
|
||||||
|
:path: ".symlinks/plugins/video_player_avfoundation/ios"
|
||||||
|
wakelock:
|
||||||
|
:path: ".symlinks/plugins/wakelock/ios"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
|
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
|
||||||
|
|
@ -54,6 +64,8 @@ SPEC CHECKSUMS:
|
||||||
photo_manager: 84fa94fbeb82e607333ea9a13c43b58e0903a463
|
photo_manager: 84fa94fbeb82e607333ea9a13c43b58e0903a463
|
||||||
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
|
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
|
||||||
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
|
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
|
||||||
|
video_player_avfoundation: e489aac24ef5cf7af82702979ed16f2a5ef84cff
|
||||||
|
wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f
|
||||||
|
|
||||||
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
|
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,13 +101,9 @@ class ImmichSliverAppBar extends ConsumerWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
systemOverlayStyle: const SystemUiOverlayStyle(
|
systemOverlayStyle: const SystemUiOverlayStyle(
|
||||||
// Status bar color
|
statusBarColor: Colors.white,
|
||||||
statusBarColor: Colors.indigo,
|
statusBarBrightness: Brightness.dark,
|
||||||
|
statusBarIconBrightness: Brightness.light),
|
||||||
// Status bar brightness (optional)
|
|
||||||
statusBarIconBrightness: Brightness.light, // For Android (dark icons)
|
|
||||||
statusBarBrightness: Brightness.dark,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
|
@ -35,7 +36,11 @@ class BackupService {
|
||||||
|
|
||||||
for (var entity in assetList) {
|
for (var entity in assetList) {
|
||||||
try {
|
try {
|
||||||
file = await entity.file.timeout(const Duration(seconds: 5));
|
if (entity.type == AssetType.video) {
|
||||||
|
file = await entity.file;
|
||||||
|
} else {
|
||||||
|
file = await entity.file.timeout(const Duration(seconds: 5));
|
||||||
|
}
|
||||||
|
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
// reading exif
|
// reading exif
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:path/path.dart' as p;
|
import 'package:path/path.dart' as p;
|
||||||
|
|
||||||
class FileHelper {
|
class FileHelper {
|
||||||
static getMimeType(String filePath) {
|
static getMimeType(String filePath) {
|
||||||
|
debugPrint(filePath);
|
||||||
var fileExtension = p.extension(filePath).split(".")[1];
|
var fileExtension = p.extension(filePath).split(".")[1];
|
||||||
|
|
||||||
switch (fileExtension) {
|
switch (fileExtension.toLowerCase()) {
|
||||||
case 'gif':
|
case 'gif':
|
||||||
return {"type": "image", "subType": "gif"};
|
return {"type": "image", "subType": "gif"};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue