1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-08 23:07:06 +02:00

feat(mobile): add additional request headers (#10588)

* add additional request headers

* improve interface

* move headers under advanced settings

* refactor

* refactor

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
Matej Kramny
2024-06-26 15:31:55 -04:00
committed by GitHub
parent a3c3619811
commit 922430da36
23 changed files with 320 additions and 48 deletions

View File

@ -4,7 +4,7 @@ import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
import 'package:immich_mobile/providers/image/exceptions/image_loading_exception.dart';
import 'package:immich_mobile/entities/store.entity.dart';
import 'package:immich_mobile/services/api.service.dart';
/// Loads the codec from the URI and sends the events to the [chunkEvents] stream
///
@ -17,9 +17,7 @@ class ImageLoader {
required ImageDecoderCallback decode,
StreamController<ImageChunkEvent>? chunkEvents,
}) async {
final headers = {
'x-immich-user-token': Store.get(StoreKey.accessToken),
};
final headers = ApiService.getRequestHeaders();
final stream = cache.getFileStream(
uri,