Skip to content

Commit

Permalink
Pass mime type to fix file validation
Browse files Browse the repository at this point in the history
  • Loading branch information
carson-katri committed Oct 23, 2024
1 parent 337fa49 commit 3114d78
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ struct _FileImporterModifier<R: RootRegistry>: 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)")
Expand Down

0 comments on commit 3114d78

Please sign in to comment.