Fix downloadFile
This commit is contained in:
19
salesbook.Maui/Platforms/iOS/Helpers/QlPreviewItemBundle.cs
Normal file
19
salesbook.Maui/Platforms/iOS/Helpers/QlPreviewItemBundle.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Foundation;
|
||||
using QuickLook;
|
||||
|
||||
namespace salesbook.Maui.Helpers;
|
||||
|
||||
public class QlPreviewItemBundle(string fileName, string filePath) : QLPreviewItem
|
||||
{
|
||||
public override string PreviewItemTitle => fileName;
|
||||
public override NSUrl PreviewItemUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
var documents = NSBundle.MainBundle.BundlePath;
|
||||
var lib = Path.Combine(documents, filePath);
|
||||
var url = NSUrl.FromFilename(lib);
|
||||
return url;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user