@umituz/react-native-ai-pruna-provider 1.0.27 → 1.0.29

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-pruna-provider",
3
- "version": "1.0.27",
3
+ "version": "1.0.29",
4
4
  "description": "Pruna AI provider for React Native - implements IAIProvider interface for unified AI generation",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -59,27 +59,21 @@ export async function uploadFileToStorage(
59
59
  return base64Data;
60
60
  }
61
61
 
62
- // Detect MIME type
63
- const mimeType = detectMimeType(base64Data);
64
- const extension = getExtensionForMime(mimeType);
65
- const filename = `upload.${extension}`;
66
-
67
62
  // Strip data URI prefix if present to get raw base64
68
63
  const rawBase64 = base64Data.includes('base64,')
69
64
  ? base64Data.split('base64,')[1]
70
65
  : base64Data;
71
66
 
72
- // Add data URI prefix for proper encoding
67
+ // Use default JPEG MIME type (detectMimeType fails on base64)
68
+ const mimeType = 'image/jpeg';
73
69
  const dataUri = `data:${mimeType};base64,${rawBase64}`;
74
70
 
75
- generationLogCollector.log(sessionId, TAG, `Uploading as data URI (${mimeType}, ${extension})...`);
71
+ generationLogCollector.log(sessionId, TAG, `Uploading as data URI (${mimeType})...`);
76
72
 
77
73
  // __DEV__ log upload details
78
74
  if (typeof __DEV__ !== 'undefined' && __DEV__) {
79
75
  console.log(`[DEV] [${TAG}] Data URI upload:`, {
80
76
  mimeType,
81
- extension,
82
- filename,
83
77
  base64Length: rawBase64.length,
84
78
  dataUriPrefix: dataUri.substring(0, 50) + '...',
85
79
  });