Hello,
I created a tiny FTP server implemented as a class to use in B4A apps. The source and an example project is attached.
Why ???
Several of my projects allow the user to add files containing a word list or database records to the app's directory. These are imported and used within the app. Currently I tell people install a third-party FTP, connect using a client on a PC, navigate to my app's directory, and transfer the file. That seems to be a little too much to ask.
Embedding the tiny FTP server into an app allows the user to invoke the FTP using a button or menu item within the app, connect from a PC, and transfer the file directly to the proper directory. Maybe this will be a little easier.
The tiny FTP server is limited in that you cannot change your working directory and I have not implemented all the FTP commands.
At the bottom of the TinyFTPSvr.bas file there are a couple handy utilities: Sprintf - similar to the C function, and FormatDateTime - similar to the Delphi function.
For convenience I have included in the attached zip file the set of utilities, DateUtils.bas, created by Erel.
Barry.
I created a tiny FTP server implemented as a class to use in B4A apps. The source and an example project is attached.
Why ???
Several of my projects allow the user to add files containing a word list or database records to the app's directory. These are imported and used within the app. Currently I tell people install a third-party FTP, connect using a client on a PC, navigate to my app's directory, and transfer the file. That seems to be a little too much to ask.
Embedding the tiny FTP server into an app allows the user to invoke the FTP using a button or menu item within the app, connect from a PC, and transfer the file directly to the proper directory. Maybe this will be a little easier.
The tiny FTP server is limited in that you cannot change your working directory and I have not implemented all the FTP commands.
At the bottom of the TinyFTPSvr.bas file there are a couple handy utilities: Sprintf - similar to the C function, and FormatDateTime - similar to the Delphi function.
For convenience I have included in the attached zip file the set of utilities, DateUtils.bas, created by Erel.
Barry.
Attachments
Last edited: