@mindedsolutions/bug-reporter-sdk 0.1.1 → 0.1.2
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.
|
@@ -27,11 +27,16 @@ function useScreenCapture() {
|
|
|
27
27
|
const supabase = (0, supabase_js_1.createClient)(config.supabaseUrl, config.supabaseAnonKey);
|
|
28
28
|
const uniqueId = `${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
|
|
29
29
|
const fileName = `${config.projectId}/${uniqueId}.jpg`;
|
|
30
|
-
|
|
31
|
-
const
|
|
30
|
+
// React Native: use FormData with file URI (fetch blob doesn't work reliably)
|
|
31
|
+
const formData = new FormData();
|
|
32
|
+
formData.append('', {
|
|
33
|
+
uri,
|
|
34
|
+
name: `${uniqueId}.jpg`,
|
|
35
|
+
type: 'image/jpeg',
|
|
36
|
+
});
|
|
32
37
|
const { error } = await supabase.storage
|
|
33
38
|
.from('screenshots')
|
|
34
|
-
.upload(fileName,
|
|
39
|
+
.upload(fileName, formData, { contentType: 'multipart/form-data' });
|
|
35
40
|
if (error)
|
|
36
41
|
return null;
|
|
37
42
|
const { data } = supabase.storage.from('screenshots').getPublicUrl(fileName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindedsolutions/bug-reporter-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "In-app bug reporting SDK for React Native/Expo with shake detection, screenshot capture, and Supabase integration",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|