Download a file to ASD and replacing a file already there

But I want to do the opposite ? Copy / move downloaded files from the /download folder to the ASD ?

Describe exactly what steps are to be taken.

  1. Do this -> event
  2. Do that -> event
  3. ...
    ...

The files are light .csv ones. The simplest way to do so would be for the sending user to send the files by mail (that I'm able to simply do so with a share bloc), and for the receiving user to click on the attached file in his mailbox, which will put the files in the download folder. And then, in the app, to select the files in the download folder and import them. But I understand that the download folder isn't accessible by the app for .csv files ?

I do not understand. Why don't you follow my suggestion to explain it step by step: 1. then 2. etc.

I don't understand that either. What is that supposed to mean?

Here is a way to download multiple files to the ASD and replace the files that have already been download before:

1 Like

Here you can find a test app (aia):

your understanding is incorrect...
as you can see from the overview

the question is, are the files in the /Download folder you like to access have been stored by your own app or not? For 1) use the file component, for 2) use the SAF extension

Taifun

Thanks for you help, I'm grateful.
I checked your test app and it's working but I struggle with one thing, which is to find the exact URL of the file I need to import.

In fact, my user can, with just a click, "share" a file or all the files in a zip file with any share solution installed on his phone. This works great.
But the reverse is much more complicated.
Is there a possibility for the user to receive a file as an attached file to a mail, and to put this file in the ASD through the app ? If not, how can I put the file on the internet with a direct URL that downloadtoASD will be able to cope with ? most cloud services give links to webpage with buttons to click to download the file :-/

What does that mean? Where does the URL(s) come from, who knows about it?
(Questions upon questions :wink:)

Hence my suggestion again:

to read an email there is the IMAP extension available

however it looks like extracting an attachment is not available there?

Taifun

Trying to be as precise as possible: I want the user to be able to import a file, either from the /download folder, or directly from internet, into the ASD so that the app uses those files on the next initializing.

  • my first idea would be a file picker, with access to the /download folder. Unfortunately, this seems not possible anymore from Android 11. I tried with no success.
  • so the second idea is direct download from the internet into the ASD, using DownloadtoASD extension. But I struggle with the correct URL to feed into the textbox before clicking the "import" button.
    For example, if I put the file on my google drive, with a link open to all users, like this one:
    ListeJuments (1).csv - Google Drive
    The URL isn't correct I have to edit the URL for the download to work. I made it work with Google Drive Direct Link Generator to get a direct link but it's frankly unusable for a normal user :-/
    Is there nothing simpler ?

So if all the URLs are from you, what's the problem? And where do the files in the /Download folder come from that cannot be accessed on Android 11+?

In other words, it's still not clear to me what exactly is supposed to happen and how.

The problem is, my app is used by several hundreds of users. The how-to manual to import data cannot be :
First put it on your drive
Then share it to anybody
Then convert the URL using some online generator
Then send the link to your phone
Then paste the link in the text box
That's not practical at all ?!

About the download option, the file would come as an attached file to a received email. When I click on it in my email app on the phone it will go in the download folder. Is there any possibility for my app to copy it to the ASD for import ?

You appear to be making life unnecessarily difficult for yourself and your users...

If it were me, I would not be bothering with files, I would be downloading data to the app, storing it in local storage (tinydb) and then providing it for users, updating the data in tinydb as required.

But the data has to be resistant to a phone change or crash. It's data my user usually keep on precious written form, for years.
If they are to put it in an app, for a better usage of this data, this can't be a case where they risk to lose the data if they lose the phone.

And the data is the user's data ! Not mine !

this is still possible, for example using the file extension and its FileList method

and as already mentioned earlier

the question is, are the files in the /Download folder you like to access have been stored by your own app or not? For 1) use the file component, for 2) use the SAF extension

Taifun

If they lose the phone, they would lose the file that also holds the data....? In fact the data is possibly safer stored in a private directory (where tinydb stores its data) than in a "public" /Downloads folder in a csv file?

If you just download the data surely/certainly you would store it online/elsewhere for backup / security purposes?

The data is not downloaded. It's saved in the app by the user.
The problem is importing / exporting this data.
Exporting is easy : a share component. Importing ?

Title of this topic....

Download a file to ASD and replacing a file already there

.
.
.
.

Regardless, just trying to give you some food for thought