@capgo/capacitor-uploader 8.0.3 → 8.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,7 @@ import net.gotev.uploadservice.observer.request.RequestObserverDelegate;
21
21
  @CapacitorPlugin(name = "Uploader")
22
22
  public class UploaderPlugin extends Plugin {
23
23
 
24
- private final String pluginVersion = "8.0.3";
24
+ private final String pluginVersion = "8.0.4";
25
25
 
26
26
  private Uploader implementation;
27
27
 
@@ -75,15 +75,8 @@ import MobileCoreServices
75
75
 
76
76
  private func guessMIMEType(from filePath: String) -> String {
77
77
  let url = URL(fileURLWithPath: filePath)
78
- if #available(iOS 14.0, *) {
79
- if let mimeType = UTType(filenameExtension: url.pathExtension)?.preferredMIMEType {
80
- return mimeType
81
- }
82
- } else {
83
- if let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, url.pathExtension as CFString, nil)?.takeRetainedValue(),
84
- let mimeType = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)?.takeRetainedValue() as String? {
85
- return mimeType
86
- }
78
+ if let mimeType = UTType(filenameExtension: url.pathExtension)?.preferredMIMEType {
79
+ return mimeType
87
80
  }
88
81
  return "application/octet-stream"
89
82
  }
@@ -3,7 +3,7 @@ import Capacitor
3
3
 
4
4
  @objc(UploaderPlugin)
5
5
  public class UploaderPlugin: CAPPlugin, CAPBridgedPlugin {
6
- private let pluginVersion: String = "8.0.3"
6
+ private let pluginVersion: String = "8.0.4"
7
7
  public let identifier = "UploaderPlugin"
8
8
  public let jsName = "Uploader"
9
9
  public let pluginMethods: [CAPPluginMethod] = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-uploader",
3
- "version": "8.0.3",
3
+ "version": "8.0.4",
4
4
  "description": "Upload file natively",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",