TeamAmaze / AmazeFileManager

Material design file manager for Android
https://teamamaze.xyz
GNU General Public License v3.0
5.3k stars 1.57k forks source link

FTP Client support #1570

Closed Xinayder closed 2 years ago

Xinayder commented 5 years ago

I've seen the previous issues and I still have the question if Amaze will have a FTP client so it can access external FTP shares. Is it a planned feature? If not, I'd like to try implementing it.

TranceLove commented 5 years ago

Been thinking of doing this a while back when I need to test the embedded FTP server, just my daytime work kept on keeping me away from doing so.

Contributions are always welcome! Please read the contribution guidelines too.

Additionally, you may want to support FTP over SSL as well - Amaze's embedded FTP server supports this too - you may take reference from Filezilla.

Xinayder commented 5 years ago

I've begun working on the FTP client, and I have a few questions:

VishalNehra commented 5 years ago

@RockyTV will drop my few recommendations.

  1. Please stick to existing project tree, i.e. services / async tasks in respective asynchronous modules and fragments in their respective ones.
  2. Can definitely reuse the SFTP dialog (was thinking the same thing when I thought of implementing it).
  3. Why trying to implement FTP client when we already have SFTP client. Honestly, a lot of users are asking for WebDAV support, you can look at sardine it has a simple enough API for implementation too. It's completely upto you though, if you want to use it for personal use, go for it. We'll definitely review your PR.
  4. You could take reference of classes in utils/SmbStreamer and utils/cloud packages to present a streamable source for media apps to open files from the server instead of downloading them.
  5. If you would prefer implementation with rxjava, you can add dependency as we currently haven't used it in Amaze yet, but I'm planning to use it now.
HT-7 commented 3 years ago

Why trying to implement FTP client when we already have SFTP client.

Because for file transfers at home, plain FTP is more than good enough.

SFTP/FTPS may be good for a private cloud server, but when pulling files from my mobile phone to the computer through local ethernet, FTP in FileZilla does the job just fine.


Another suggestion if the FTP client feature gets implemented:

MFMT command FTP uploading

(I was about to open a new issue for it, but then I thought I just post it here for now.)

When uploading files to an FTP server, I would sometimes like to keep the original modified time attribute.

More recent implementations of FTP support the Modify Fact: Modification Time (MFMT) command, which allows a client to adjust that file attribute remotely, enabling the preservation of that attribute when uploading files. (Source).

Yes, I can pull the files from FileZilla on my computer (which supports preserving the time stamp), but sometimes I would just like to upload them from the comfort of my phone upon space storage exhaustion without having to run to the computer.

(I just have to figure out how to enable MFMT in vsftpd.)

Side note: Obviously, an MFMT FTP server on an Android phone would not be possible without root access, because adjusting the date/time file attribute on Android apparently requires root permissions.