We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
- Steps to replicate the issue
RN version "react": "18.1.0", "react-native": "0.70.6",
android version 14 Device Samsung s23 ultra
*here is my code sinnpet ''' export const exportClientData = async (type: 'all' | 'single', client_id?: string) => { let filepath = ''; let url = '';
if (type === 'all') { url = https://...; } else if (type === 'single') { url = https:///.......; }
https://...
https:///.......
// Get the app's cache directory const { fs } = ReactNativeBlobUtil; const cacheDir = Platform.OS === 'ios' ? fs.dirs.DocumentDir : fs.dirs.LegacyDownloadDir;
// Define the filename const filename = 'filename';
// Construct the full filepath if (type === 'all') { filepath = ${cacheDir}/${filename}/ClientData.zip; } else if (type === 'single') { filepath = ${cacheDir}/${filename}/${client_id}.zip; }
${cacheDir}/${filename}/ClientData.zip
${cacheDir}/${filename}/${client_id}.zip
try { // // Ensure the directory exists // const dirPath = ${cacheDir}/${filename}; // const isDir = await fs.isDir(dirPath); // Check if the directory exists
${cacheDir}/${filename}
// if (!isDir) { // await fs.mkdir(dirPath); // Create the directory if it does not exist // } // Download the file and save it to the cache directory const configOptions:any = Platform.select({ ios: { fileCache: true, path: filepath, appendExt: 'zip', }, android: { fileCache: true, path: filepath, appendExt: 'zip', }, }); const response = await ReactNativeBlobUtil.config(configOptions).fetch('GET', url, { "Accept": "*/*", "Accept-Encoding": "*/*", }); console.log('response==>>', JSON.stringify(response, undefined, 4)); return response;
} catch (error) { console.error('error in downloading==>', error); return error; } }; '''
The text was updated successfully, but these errors were encountered:
any update anyone?
Sorry, something went wrong.
@YASH6004 Facing the same problem. Did you solve it?
No branches or pull requests
Hi,
- Steps to replicate the issue
RN version
"react": "18.1.0",
"react-native": "0.70.6",
android version 14
Device Samsung s23 ultra
*here is my code sinnpet '''
export const exportClientData = async (type: 'all' | 'single', client_id?: string) => {
let filepath = '';
let url = '';
if (type === 'all') {
url =
https://...
;} else if (type === 'single') {
url =
https:///.......
;}
// Get the app's cache directory
const { fs } = ReactNativeBlobUtil;
const cacheDir = Platform.OS === 'ios' ? fs.dirs.DocumentDir : fs.dirs.LegacyDownloadDir;
// Define the filename
const filename = 'filename';
// Construct the full filepath
if (type === 'all') {
filepath =
${cacheDir}/${filename}/ClientData.zip
;} else if (type === 'single') {
filepath =
${cacheDir}/${filename}/${client_id}.zip
;}
try {
// // Ensure the directory exists
// const dirPath =
${cacheDir}/${filename}
;// const isDir = await fs.isDir(dirPath); // Check if the directory exists
} catch (error) {
console.error('error in downloading==>', error);
return error;
}
};
'''
The text was updated successfully, but these errors were encountered: