-
Notifications
You must be signed in to change notification settings - Fork 8
#6006 add path and thumbnails to yust file #399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Url deprecaten
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kommentare
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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) => |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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 ? '&' : '?'; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pointycastle
No description provided.