Page 1 of 1

Intent to upload a full folder (including subfolder)

Posted: Mon Apr 05, 2010 7:43 pm
by support
You can call AndFTP intent to upload a full folder to FTP/FTPS/SFTP server:

Code: Select all

Intent intent = new Intent();
// FTP URL (Starts with ftp://, sftp:// or ftps:// followed by hostname and port).
Uri ftpUri = Uri.parse("");
intent.setDataAndType(ftpUri, "");
// FTP credentials (optional)
intent.putExtra("ftp_username", "anonymous");
intent.putExtra("ftp_password", "");
//intent.putExtra("ftp_keyfile", "/sdcard/dsakey.txt");
//intent.putExtra("ftp_keypass", "optionalkeypassword");
// FTP settings (optional)
intent.putExtra("ftp_pasv", "true");
//intent.putExtra("ftp_resume", "true");
//intent.putExtra("ftp_encoding", "UTF8");
// Upload
intent.putExtra("command_type", "upload");
// Activity title
intent.putExtra("progress_title", "Uploading folder ...");
intent.putExtra("local_file1", "/sdcard/localfolder");
// Optional initial remote folder (it must exist before upload)
intent.putExtra("remote_folder", "remotefolder/uploadedfolder");
startActivityForResult(intent, 2);
It will open upload dialog:
Upload full folder
Upload full folder
intent_upload_folder.png (21.59 KiB) Viewed 6534 times