0

my solution:

 const permissions = await FileSystem.StorageAccessFramework.requestDirectoryPermissionsAsync()
                    if (permissions.granted) {
                        await FileSystem.StorageAccessFramework.createFileAsync(permissions.directoryUri, fileName, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')
                        .then(async (uri) => {
                                await FileSystem.writeAsStringAsync(uri, fileData, { encoding: FileSystem.EncodingType.Base64 })
                            }
                        )
                        .catch(error => Alert.alert("error", "Sorry, we can't upload to this folder! Please choose another folder! "))
                        
                    }

But I need to save the file without await FileSystem.StorageAccessFramework.requestDirectoryPermissionsAsync() because it's not user friendly

Oleg
  • 1
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Jul 22 '23 at 16:58

0 Answers0