File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { AppwriteException, Client } from '../client';
3
3
import type { Models } from '../models' ;
4
4
import type { UploadProgress , Payload } from '../client' ;
5
5
import * as FileSystem from 'expo-file-system' ;
6
- import * as Device from 'expo-device'
6
+ import { Platform } from 'react-native' ;
7
7
8
8
export class Storage extends Service {
9
9
@@ -141,7 +141,7 @@ export class Storage extends Service {
141
141
length : Service . CHUNK_SIZE
142
142
} ) ;
143
143
var path = `data:${ file . type } ;base64,${ chunk } ` ;
144
- if ( Device . osName == 'Android ' ) {
144
+ if ( Platform . os . toLowerCase ( ) == 'android ' ) {
145
145
path = FileSystem . cacheDirectory + '/tmp_chunk' ;
146
146
await FileSystem . writeAsStringAsync ( path , chunk , { encoding : FileSystem . EncodingType . Base64 } ) ;
147
147
}
You can’t perform that action at this time.
0 commit comments