uplaod to dropbox

Post your questions and help other users.

Moderator: Martin

Post Reply
medhassano
Posts: 22
Joined: 26 Aug 2019 14:47

uplaod to dropbox

Post by medhassano » 05 Oct 2019 17:11

Hello,
on this flow, I would like to upload all files from the directory / data to Dropbox except the file being recorded audio, and after all deleting exception the file being recorded audio, my problem is that it deletes only one file and not all.
can I have a solution from you
Thank you
Attachments
IMG_20191005_171901.png
IMG_20191005_171901.png (180.41 KiB) Viewed 10534 times

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: uplaod to dropbox

Post by Desmanto » 06 Oct 2019 17:17

The script before the delete files is not correct.

Code: Select all

dellist = newList();
if(length(files) > 1)
  addElement(dellist, files[0]); // this will only add one file
You should loop against the files, event if it is only 1 file.

Code: Select all

dellist = newList();
for(i in files)
  addElement(dellist, files[0]); // this will all the files to the delete list
Since this is dangerous action (delete), you should try with caution. Make sure you copy the file first, just in case it delete the wrong file. And make sure the path to delete is correct. Use condition debug dialog to check the {dellist} content before using it with delete files.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

medhassano
Posts: 22
Joined: 26 Aug 2019 14:47

Re: uplaod to dropbox

Post by medhassano » 06 Oct 2019 22:01

Sorry, still same problem

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: uplaod to dropbox

Post by Desmanto » 09 Oct 2019 18:09

How many files do you have on that directory? Check the value of the {dellist} in debug dialog. Looking from your trigger is file observer, most likely this will have only one file per upload. Since it is triggered on every file write.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

medhassano
Posts: 22
Joined: 26 Aug 2019 14:47

Re: uplaod to dropbox

Post by medhassano » 10 Oct 2019 14:57

Thank you

Post Reply