Android Question Problem with Download Files from FTP Server

hasexxl1988

Active Member
Licensed User
Longtime User
Hello,
i have Problems with FileDownload.

The Test Picture is Damaged.

I have tryed the Code from Erels Tutorial (https://www.b4x.com/android/forum/threads/android-ftp-tutorial.10407/#content)

Upload is Correct with this Code (have Opened the Picture on FTP Server with FileZilla):
B4X:
FTP.UploadFile(File.DirInternal, "testpic.jpg", False, "testpic.jpg")

However, the image will be Destroyed during the download and will not open.

i have tryed:
B4X:
FTP.DownloadFile("testpic.jpg", True, File.DirInternal, "testpicdown.jpg")
AND
B4X:
FTP.DownloadFile("testpic.jpg", False, File.DirInternal, "testpicdown.jpg")

Image Size is 100% to Same.

Does anyone have a suggestion?
 

hasexxl1988

Active Member
Licensed User
Longtime User
The AsciiFile parameter should be false.

You should handle the DownloadCompleted event. If Success is true then the file was downloaded successfully.

Success is True in the Log.

I have try with AsciiFile Parameter False

FTP.PassiveMode is False. If i try True Success is False
 
Upvote 0
Top