diff --git a/Sources/LiveViewNative/Stylesheets/Modifiers/Files/FileImporterModifier.swift b/Sources/LiveViewNative/Stylesheets/Modifiers/Files/FileImporterModifier.swift index e0f142ce2..295056e9e 100644 --- a/Sources/LiveViewNative/Stylesheets/Modifiers/Files/FileImporterModifier.swift +++ b/Sources/LiveViewNative/Stylesheets/Modifiers/Files/FileImporterModifier.swift @@ -74,15 +74,15 @@ struct _FileImporterModifier: ViewModifier { let files = try result.get().map({ url in LiveFile( try Data(contentsOf: url), - url.pathExtension, - url.deletingPathExtension().lastPathComponent, + UTType(filenameExtension: url.pathExtension)!.preferredMIMEType!, + url.lastPathComponent, id ) }) Task { do { for file in files { - try await liveChannel.validateUpload(file) + print(try await liveChannel.validateUpload(file)) } } catch { logger.log(level: .error, "\(error.localizedDescription)")