FTP Upload

davelt99

Member
Licensed User
Longtime User
I'm trying to upload a jpg image from phone to website. The process seems to be working, although it never gets to FTP_uploadcompleted.

The file shows up in the proper place on the server, listed with the correct file name and file size but when opening it I get an Invalid Image method. When looking at the properties of the image - there are no dimensions given. I originally thought that it was due to the 1.5mb size of the jpg but am still having the problem when uploading a 20kb jpg image.

These are my first attempts using the FTP within B4A. Any help would be greatly appreciated.

Thank you,
Dave Tucker
 

davelt99

Member
Licensed User
Longtime User
A portion of the relevant code is below.

Not sure what is meant by ASCII mode but the server platform is
Windows Server 2007 with IIS 6.

dim sFTP as FTP
dim sMediaPath as string
dim sMediaFile as string
sMediaPath=fd.Filepath '''' from FileDialog
sMediaFile=fd.ChosenName '''' from FileDialog
sFTP.Initialize("FTP", myFTPIPaddress, 21, userID, password)
sFTP.UploadFile(sMediaPath, sMediaFile, True, "/inetpub/wwwroot/Accountabillity/visuals/" & sMediaFile)
 
Upvote 0
Top