apache / cordova-plugin-file

Apache Cordova File Plugin
https://cordova.apache.org/
Apache License 2.0
742 stars 759 forks source link

Download Issue #380

Closed anishadh3892 closed 1 year ago

anishadh3892 commented 4 years ago

Bug Report

Problem

Im creating a Cordova application. On that I have a function to rewrite the file I uploaded and download it. The problem is if I try to download the file which was updated by me was remains the same for 5 mins. But the rewrite and saving got successful. After 5 mins it got downloaded. If I try to download it before 5 mins the old file was downloaded. can anyone help on this issue. I don't know why it happens. This issue is in both iOS and Android

What is expected to happen?

updated file must be downloaded

What does actually happen?

but the file before the rewrite got downloaded

Environment, Platform, Device

Android and iOS

Version information

Latest Cordova9 is being used

Checklist

breautek commented 4 years ago

Sorry, your problem is not very clear to me. This plugin only offers APIs to read and write files to the filesystem. It does not provide the means of downloading files, that is handled externally (through XMLHttpRequest object for example).

If you're trying to read updated files, make sure you receive a new file entry and reread the data. If you used an old file entry object, it may have out-of-date metadata about the file and cause it to read the file incorrectly.

breautek commented 1 year ago

Closing as stale / no response.