Ecommerce Shopify WordPress Discussion

Change gravityform upload folder to a new host via ftp

we have a gravityform which has a multiple upload field and want when user upload files the files upload to a second host via ftp connection how can we implement this? here what we do until now the main site is mysite.com and the subdomain which hosted on another hsoting is files.mysite.com add_filter( 'gform_upload_path', 'change_upload_path', 10, 2 ); function change_upload_path( $path_info, $form_id ) { // FTP credentials for host two $ftp_host = '***'; $ftp_username = '***'; $ftp_password = '***'; // Remote path on host two where files should be uploaded $remote_path = '/public_html/guaranty_uploads/'; // Connect to host two via FTP $ftp_connection = ftp_connect($ftp_host); ftp_login($ftp_connection, $ftp_username, $ftp_password); // Set the FTP upload directory on host two ftp_chdir($ftp_connection, $remote_path); // Update the path_info array with the FTP details $path_info['path'] = $remote_path; $path_info['url'] = 'http://files.mysite.com/guaranty_uploads/'; $path_info['ftp_connection'] = $ftp_connection; return $path_info; } best regards
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.