Reputation: 560
I'd like to know whether or not QuickLook supports a file before I download it so I can have a better UX flow. Anyone know if this is possible? It seems
QLPreviewController.canPreview(item: QLPreviewItem)
requires that the file be downloaded. Is there any better way than having a list of file extensions and checking my extension on that?
Upvotes: 1
Views: 556
Reputation: 1145
Yes it does support opening without the file, but you can't check if the file is supported before it's downloaded.
If the file is not there, it will display an empty screen with a spinner, and display the file as soon as it's available.
I've just implemented this workflow on my app:
Hope this helps.
Upvotes: 1