Skip to content

Conversation

@cJannik
Copy link
Contributor

@cJannik cJannik commented Nov 19, 2025

No description provided.

@cJannik cJannik self-assigned this Nov 19, 2025
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Url deprecaten

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oder follow up :)

case 'createdAt':
return createdAt;
case 'path':
return path;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auch rausnehmen

return name!.contains('.') ? name!.split('.').last : '';
}

bool hasThumbnail() => thumbnails?.isNotEmpty ?? false;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kommentare

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getter

final baseUrl = Yust.fileAccessService.originalCdnBaseUrl;
final grant = Yust.fileAccessService.getGrantForFile(this);

if (baseUrl == null || grant == null || path == null) return url;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kommentar wann passiert das

return '${_tryAppendSlash(baseUrl)}$thumbnailPath?${grant.thumbnailSignedUrlPart}';
}

String? _tryAppendSlash(String baseUrl) =>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enforcen im service

/// [additionalQueryParams] are additional query parameters to be added to the URL.
/// These will be signed and must exist in the same order in the signed URL.
String signFilePath({
required String objectPath,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path

var uriWithPort = Uri.parse(fullUrlWithPort);

// Add optional query parameters to the url that will be signed
final queryParams = Map<String, String>.from(uriWithPort.queryParameters);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{...} einzeiler

final expires = _unix(validFor);

final uri = Uri.parse(fullUrl);
final separator = uri.hasQuery ? '&' : '?';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ggf query parameter zeug schöner machen; nur ein replace call dafür und nur einmal uri zu string

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

query params zu uri hinzufügen anstatt selber zu bauen

pushService = YustPushServiceMocked();
Yust.authService = YustAuthServiceMocked(this);
Yust.fileService = YustFileServiceMocked();
Yust.fileAccessService = YustFileAccessServiceMocked(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

statische mock url setzen, nicht weiterreichen

uuid: ^4.5.1
meta: '>=1.15.0 <2.0.0'
dart_jsonwebtoken: ^3.2.0
crypto: ^3.0.7
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pointycastle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants