Skip to content
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

fix(mobile): incorrect filename is retrieved during upload #12990

Merged
merged 4 commits into from
Sep 27, 2024

Conversation

alextran1502
Copy link
Contributor

No description provided.

String originalFileName = asset.fileName;
String? originalFileName =
await _assetMediaRepository.getOriginalFilename(asset.localId!);
originalFileName ??= asset.fileName;
Copy link
Member

Choose a reason for hiding this comment

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

This fallback should maybe be inside the func above?

Is this syntax common in the mobile codebase? I find it really confusing lol.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, if null, assign the value, otherwise keep the current value.

Inside the function, the AssetEntity can be null, so there is no property to get the other filename from

@danieldietzler danieldietzler changed the title fix(mobile): incorrect filename is retrieve during upload fix(mobile): incorrect filename is retrieved during upload Sep 27, 2024
@alextran1502 alextran1502 merged commit 03aa346 into main Sep 27, 2024
35 checks passed
@alextran1502 alextran1502 deleted the fix/incorrect-filename branch September 27, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants