Skip to main content
Home
Techies Briefcase
~ by Hari Venu

Main navigation

  • Home
  • About me
  • Photos
  • My Bookmarks

Breadcrumb

  1. Home
  2. File Upload Using SFTP In Drupal's Custom Form (PHPSeclib Library)

File upload using SFTP in Drupal's custom form (PHPSeclib library)

By hari, 1 March, 2023

Install phpseclib library into your project by using composer command

$ composer require phpseclib/phpseclib 

Then create custom form for store the SFTP credentials and SFTP file button.

Below I have added the custom form code for your reference.

Small explanation for the above code.

I have uploaded the files form ${SOURCE}/var/www/html/html to /var/www/html using SFTP, and above code will upload all the subfolders and files to destination folder. It is also cleanup destination directory.

For your reference PHPSeclib docs
  • SFTP login
  • SFTP Upload File
Reference
  • https://phpseclib.com/docs/sftp

Tags

  • Drupal
  • PHPSeclib
 

Topics

  • Composer
  • Commad Line Tools
  • JavaScript
  • Drupal
  • Solar Panel
  • Permission
  • Libraries
  • MySQL
  • Commad Line
  • RSA
  • VSCode
  • Windows
  • Entity Query API
  • Ubuntu
  • Bash Script
  • Drush
  • Bower
  • Errors
  • Workflow
  • File API
  • Docker
  • Linux
  • Lando
  • Articles
  • Views
  • Nginx
  • Twig
  • Multilingual
  • OOPs
  • Coder
  • Solar Power
  • PHP
  • Field API
  • Android
  • Cache
  • Webform
  • jQuery
  • phpcbf
  • Ajax API
  • Distribution
  • Drupal Behavior
  • Learning
  • kali
  • professional development
  • Neuron AI
  • Jellyfin
  • SSH
  • URL
  • Macbook
  • WSL2
  • Drupal AI
  • NPM
  • Git
  • Form API
  • phpcs
  • Drupal Console
  • Codesniffer
  • Moderation
  • PHPSeclib
  • Taxonomy
  • Mac OS
RSS Feed

Who am I !!!

Hari Venu V
harivenu.v1992@gmail.com
Mobile : +91 9895164181
Whatsapp : +91 9895164181
Linkedin
Drupal.org
Github

Document
Resume.pdf (114.38 KB)

Work !!!

Fulltime Developer @ QED42
hari.venu@qed42.com
Linkedin

Powered by Drupal & Maintained by Hari