@umituz/react-native-ai-generation-content 1.17.155 → 1.17.157
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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Uses ONLY configured app services - no alternatives
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import * as FileSystem from "expo-file-system";
|
|
7
7
|
import { getAuthService, getCreditService, getPaywallService, isAppServicesConfigured } from "../config/app-services.config";
|
|
8
8
|
|
|
9
9
|
declare const __DEV__: boolean;
|
|
@@ -18,16 +18,15 @@ export interface FeatureUtilsConfig {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export async function prepareImage(uri: string): Promise<string> {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
compress: 0.9,
|
|
21
|
+
const base64 = await FileSystem.readAsStringAsync(uri, {
|
|
22
|
+
encoding: FileSystem.EncodingType.Base64,
|
|
24
23
|
});
|
|
25
24
|
|
|
26
|
-
if (!
|
|
25
|
+
if (!base64) {
|
|
27
26
|
throw new Error("Failed to convert image to base64");
|
|
28
27
|
}
|
|
29
28
|
|
|
30
|
-
return
|
|
29
|
+
return base64;
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
export function createDevCallbacks(featureName: string) {
|