react-native-appwrite 0.2.0 → 0.2.1
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/dist/cjs/sdk.js +6 -1
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +6 -1
- package/dist/esm/sdk.js.map +1 -1
- package/package.json +1 -1
- package/src/services/storage.ts +7 -2
package/dist/cjs/sdk.js
CHANGED
|
@@ -2310,7 +2310,12 @@ class Storage extends Service {
|
|
|
2310
2310
|
position: offset,
|
|
2311
2311
|
length: Service.CHUNK_SIZE
|
|
2312
2312
|
});
|
|
2313
|
-
|
|
2313
|
+
var path = `data:${file.type};base64,${chunk}`;
|
|
2314
|
+
if (Device__namespace.osName == 'Android') {
|
|
2315
|
+
path = FileSystem__namespace.cacheDirectory + '/tmp_chunk';
|
|
2316
|
+
yield FileSystem__namespace.writeAsStringAsync(path, chunk, { encoding: FileSystem__namespace.EncodingType.Base64 });
|
|
2317
|
+
}
|
|
2318
|
+
payload['file'] = { uri: path, name: file.name, type: file.type };
|
|
2314
2319
|
response = yield this.client.call('post', uri, apiHeaders, payload);
|
|
2315
2320
|
if (onProgress) {
|
|
2316
2321
|
onProgress({
|