DownloadServer example

Rusty

Well-Known Member
Licensed User
Longtime User
The example of the DownloadServer works great when a text file is downloaded,but if I try to use it to download a .DB3 file or .APK, it says the file is not found.
Is there a setting for the example to indicate files being downloaded are not text?
I have been able to download .txt, .apk, .png, but can not download .db3 or .mdb files. the database files are over 100K each, is a file's size a limitation?
Both the db3 and mdb files come back with the error "file not found". I have used FileZilla to see the file and have even copied the URL of the file into the clipboard for verification. The .txt file is sitting in the same folder on the site and is easily (and fast) downloaded, but the db3 file is "not found"
OK, I tried copying a text file of 100 bytes into another text file named TestDELETE.db3. Keeping the case of the filename intact, I tried to download it and even it is "not found". All path information is the same, but only the db3 extension seems to confuse it...
I tried pkzipping the .mdb file into a zip and Filezilla it to the same folder right next to the .mdb file. Then I ran the downloadservice and it downloaded fine, with the .zip extension. Same results for the .db3 file, only naming it .zip instead of .db3, it finds it and downloads it. (not actually a zip file, but the raw .db3 file merely renamed to .zip)

Thanks,
 
Last edited:

Rusty

Well-Known Member
Licensed User
Longtime User
Using the exact code from the DownloadServer example (in post post43109) unchanged except for filenames/locations, I run it with these lines: (I've changed the URL for this fairly public message)

This file is NOT found:
B4X:
DownloadService.URL = "http://www.  mywebslocation here .com/download/org/University/survey/data/survey.db3"
DownloadService.Target = File.OpenOutput(File.DirRootExternal, "survey.db3", False)
StartService(DownloadService)
This file IS found:
B4X:
DownloadService.URL = "http://www.  mywebslocation here .com/download/org/University/survey/data/.txt"
DownloadService.Target = File.OpenOutput(File.DirRootExternal, "profiles.txt", False)
StartService(DownloadService)
From FILEZILLA:
remote site: /download/org/University/survey/data
org
--University
----data
-----survey.mdb 696,320
-----survey.db3 126,976
-----profile.txt 25
-----facilities.txt 23
...many more files
Only the .db3 and mdb files fail. If I rename the .mdb to txt or zip it finds it and downloads it.
Thanks Erel. (If we can communicate privately, I can provide exact URL locations for you, if you need.)
 
Last edited:
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
It comes back with a 404 error, which seems to translate into not found.
The URL and file does exist, as I can look at it with Filezilla and other FTP programs.
It seems the name is what is confusing it, because I can take the exact same file and rename it to anything except .db3 or .mdb and it will find and transmit the file, so the file contents shouldn't be the problem...
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
I can not access the file with a browser. It is contained withing a folder on my website and is secure. I am able to access it via FileZilla (an FTP program) also, I wrote an FTP program that does access/download the file successfully, but very slowly.
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
Ok. I understand but don't understand.
There are 505 files on the server. I can download 503 of them from the server except the two .db3 and .mdb files.
If I use Filezilla and merely rename the two files that are on the server, not replicate them, i can copy all 505 files including the two.
It is not clear to me how the FTP, HTTP issue enters into this.
I did write an FTP program to do this, but my client doesn't support FTP from their secured site.
Thanks, Erel
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
It is a GoDaddy hosted website, Windows
yes, with Filezilla, I provide a userid and password.
for some reason, I can still get to other files though.
Doesn't sound too secure, huh?
Is there a ID/password capability to the HTTP lib? or another lib?
Thanks,
 
Upvote 0

parijs

Active Member
Licensed User
Longtime User
I also had something like it
by me it was the extension it was not. jpg but. JPG
On my server I saw. jpg but by properties it had JPG
 
Last edited:
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
How did you see the properties? What product were you able to see these differences on your server names?
Thanks!
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
Thanks for all the good ideas and advice.
I'm lost. I think I'll have to rename the files to something besides .mdb and .db3 and download them and rename them upon arrival.
Interesting problem though.
 
Upvote 0
Top