PHP code example of shopwarelabs / swag-media-sftp

1. Go to this page and download the library: Download shopwarelabs/swag-media-sftp library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

shopwarelabs / swag-media-sftp example snippets


'cdn' => [
    'backend' => 'sftp',
    'adapters' => [
        'sftp' => [
            'type' => 'sftp',
            'mediaUrl' => 'YOUR_REMOTE_MEDIA_URL',
            'host' => 'YOUR_REMOTE_HOST',
            'port' => 22,
            'username' => 'YOUR_REMOTE_USERNAME',
            'password' => 'YOUR_REMOTE_PASSWORD',
            'privateKey' => 'PATH_TO_PRIVATE_KEY_FILE',
            'root' => 'YOUR_PATH_ON_REMOTE_HOST',
            'timeout' => 10
        ]
    ]
]