You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-06-24 04:46:50 +02:00
refactor(server): download file (#1512)
* refactor(server): download file * chore: generate open-api and remove unused refs * chore(server): tests * chore: remove unused code
This commit is contained in:
21
mobile/openapi/lib/api/asset_api.dart
generated
21
mobile/openapi/lib/api/asset_api.dart
generated
@ -234,11 +234,7 @@ class AssetApi {
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] assetId (required):
|
||||
///
|
||||
/// * [bool] isThumb:
|
||||
///
|
||||
/// * [bool] isWeb:
|
||||
Future<Response> downloadFileWithHttpInfo(String assetId, { bool? isThumb, bool? isWeb, }) async {
|
||||
Future<Response> downloadFileWithHttpInfo(String assetId,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/asset/download/{assetId}'
|
||||
.replaceAll('{assetId}', assetId);
|
||||
@ -250,13 +246,6 @@ class AssetApi {
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (isThumb != null) {
|
||||
queryParams.addAll(_queryParams('', 'isThumb', isThumb));
|
||||
}
|
||||
if (isWeb != null) {
|
||||
queryParams.addAll(_queryParams('', 'isWeb', isWeb));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
@ -276,12 +265,8 @@ class AssetApi {
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] assetId (required):
|
||||
///
|
||||
/// * [bool] isThumb:
|
||||
///
|
||||
/// * [bool] isWeb:
|
||||
Future<Object?> downloadFile(String assetId, { bool? isThumb, bool? isWeb, }) async {
|
||||
final response = await downloadFileWithHttpInfo(assetId, isThumb: isThumb, isWeb: isWeb, );
|
||||
Future<Object?> downloadFile(String assetId,) async {
|
||||
final response = await downloadFileWithHttpInfo(assetId,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
|
Reference in New Issue
Block a user