# Test ftp connection from web form

**URL:** <https://www.ruby-forum.com/t/test-ftp-connection-from-web-form/166202>\
**Category:** Rails\
**Created:** [April 22, 2009, 6:37pm UTC](https://www.ruby-forum.com/t/test-ftp-connection-from-web-form/166202 "2009-04-22T18:37:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianzimmer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@brianzimmer](https://www.ruby-forum.com/u/brianzimmer)\
**Post date:** [April 22, 2009, 6:37pm UTC](https://www.ruby-forum.com/t/test-ftp-connection-from-web-form/166202/1 "2009-04-22T18:37:56Z")

</div>

Hello,

I’m trying to figure out the best method to test an ftp connection from  
a web form.

For example,

There is a web form with fields for ftp\_host, ftp\_username,  
ftp\_password. I created a controller action ‘ftp\_connection\_test’ where  
I grab the current users saved ftp information, try to connect, run a  
directory listing command and return the success or error message in  
flash. This seems to be working fine on my ‘user settings’ pages.

What I’m trying to figure out how to do is:

Run this same action on a sign-up form to test the ftp connection before  
the fields actually get saved.

Would it be best to do this with RJS? It would be neat if I could  
automatically run the ftp connection test once all the ftp fields are  
filled out.

Thanks for any suggestions
