-
Notifications
You must be signed in to change notification settings - Fork 319
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
iOS filtration by file type #940
Comments
Yes, I understand it. That's why I propose use other steps to filter it. I mean, that we need to add this functionality in library and we can add it in other steps. We don't need to be blocked with PHFetchOptions, because we can use other ways. |
That should be more about business logic, so should I close this issue? |
@CaiJingLong why do you talk that it's business logic? I don't think so. It's on data side and should be handled by library. |
PHAsset has no mimeType, and fileName also needs to obtain all resources, then traverse and obtain the corresponding filename, and then filter, instead of directly completing it through fetchOption. Therefore, if native filtering is required, all resources need to be traversed even in native, which does not improve efficiency, nor is it what native should provide. The PhotoManager library is only a native package wrapper, and the content not provided by the native is all business logic. For your problem, you can set the |
Platforms
iOS, macOS
Description
There is no way to filter media by its extension (jpeg, png). Currently we can use only this keys https://developer.apple.com/documentation/photokit/phfetchoptions . And as you can see most appropriate is mediaType and mediaSubtypes . First is already implemented and it can filter only image/video, but mediaSubtypes completely useless because it helps us to use very strange list of values https://developer.apple.com/documentation/photokit/phassetmediasubtype , actually I have no idea when they can be useful in real-world applications.
I suggest to use https://developer.apple.com/documentation/uniformtypeidentifiers . It'll help us to filter files by this identifiers. But currently we don't have any possibility to use it.
Actually it would be great, if you can create special filter params which will be cross platform. It could use mimeType on android and identifiers on iOS. Because I spent a lot time to find solution for filtering, and currently can support only Android.
Why
No response
The text was updated successfully, but these errors were encountered: