Open amauryVedana opened 4 years ago
I'm using RNFS.downloadFile to call an url which redirect me to an other url (with 302) to download a file. On ios 12 it is working well, however on ios 13 (13.4) it returns me a status code 400.
const CallWebApiDownload = async ( options: IServiceArguments, destinationPath: string, onProgress: (res: any) => void ) => { const loginReducerParameters = await getApiCallParameters(options); const requestId = getRequestId(); const res = RNFS.downloadFile({ fromUrl: options.path, toFile: destinationPath, headers: getHeader(loginReducerParameters, requestId), progress: onProgress, progressInterval: 10, progressDivider: 5 }); await res.promise return res };
this happens both on simulator and real device. I managed to make it works using rn-fetch-blob. Anyone having the same problem ?
Turns out that the headers would be forwarded in redirection which may cause some servers to reject
Yes, i'm 90% sure it's what happens to my side too
Any fix for this one?
Is there any progress?
I'm using RNFS.downloadFile to call an url which redirect me to an other url (with 302) to download a file. On ios 12 it is working well, however on ios 13 (13.4) it returns me a status code 400.
this happens both on simulator and real device. I managed to make it works using rn-fetch-blob. Anyone having the same problem ?