Indeed I have seen - but as a Block, repeating the filename twice will not be expected by most users when asked for the URL and filename........
I made another test from scratch using only the v4 extension. It downloads, but it cannot open the downloaded file.
Error No: 2101
Message
The file: /storage/emulated/0/Android/data/appinventor.ai_chrisward2k2.test5/files /Fruit.txt could not be found
..... that would seem to be because "files" is inserted in the ASD Path but the file is downloaded directly to the ASD?
test5.aia (19.9 KB)
borrar_GoogleDrive.aia (27.6 KB)
Date Built: 2020-11-01
TIMAI2
October 13, 2022, 12:41pm
86
Used V4 with these blocks
worked in companion (chromebook app)
Compiled, and worked on device (Google Pixel 4a / Android 13)
Anke
October 13, 2022, 1:57pm
88
@Anke , can you compile this?
try_downloadASD.aia (26.7 KB)
What is the build date of the V4 you used Tim? Also, can you download Fruit.txt from my website?
TIMAI2
October 13, 2022, 3:19pm
93
Extension says file exists, but I am unable to read it (guessing I have a file with 0 bytes ?) however, the image file I showed in my blocks has downloaded just fine, and displays OK
Do you mean 'Fruits.txt'? It is downloaded and it has content - it's 906 bytes.
You can just type the URL into your browser to see the file content
https://professorcad.co.uk/Files/Fruit.txt
That's from google drive, which seems to work without a path issue.
Anke
October 13, 2022, 5:41pm
96
Try this one:
try_downloadASD.aia (18.8 KB)
Anke
October 13, 2022, 5:43pm
97
With which aia? Please post it (again).
Anke
October 13, 2022, 5:47pm
98
Try this: downloadASD_new.aia (18.9 KB)
1 Like
The file is not overwritten, when we download files and assign the same name they are saved as
photo.png
photo-1.png
photo-2.png
photo-3.png
...
This compiles correctly , maybe the problem occurred when updating the extension.
1 Like
Anke
October 13, 2022, 6:17pm
102
Yes, that is known. Download only if the file does not exist (or remove the file beforehand).