bigoldbird
asked on
ftp a file from a form
I am building a sample application that would normally run over an intranet in an internet environment, so the normal file system commands I would use are not available.
I need to be able to ftp a file to a server which is an sql server rather than the web server that is hosting the page.
I want the user to be able to use a form to browse to a file (that bit I can do!) and then on submit the file should be FTP'd to the server. I have: the server IP, the directory structure I want to FTP to, the user name and the password.
Is there a simple script (I'm not a techie) that I can use to do the FTP?
The application is SQL/ASP based.
Thanks
Karen
I need to be able to ftp a file to a server which is an sql server rather than the web server that is hosting the page.
I want the user to be able to use a form to browse to a file (that bit I can do!) and then on submit the file should be FTP'd to the server. I have: the server IP, the directory structure I want to FTP to, the user name and the password.
Is there a simple script (I'm not a techie) that I can use to do the FTP?
The application is SQL/ASP based.
Thanks
Karen
what browser is you refer to?
Actually you can do it in IE, without any programming needed, just try typing the FTP address on a IE browser address bar, and it will prompt you for the username and password.
After logged in, you can just do a "Copy and Paste" just the same you did on your Windows folder.
If you want an Interface, i suggest you download a FTP client from some popular softwares download sites instead. No worth to research and develop a FTP component here.
regards
Actually you can do it in IE, without any programming needed, just try typing the FTP address on a IE browser address bar, and it will prompt you for the username and password.
After logged in, you can just do a "Copy and Paste" just the same you did on your Windows folder.
If you want an Interface, i suggest you download a FTP client from some popular softwares download sites instead. No worth to research and develop a FTP component here.
regards
ASKER
sudhakar
Thank you for your comments. I know that an SQL server is not an FTP server but in this instance I need to get a file from a client computer onto the SQL server so that I can run an BULK INSERT procedure.
I can't use ASPupload (well I don't think so) because the SQL server is not the IIS server where the loading page will be hosted.
Thank you for your comments. I know that an SQL server is not an FTP server but in this instance I need to get a file from a client computer onto the SQL server so that I can run an BULK INSERT procedure.
I can't use ASPupload (well I don't think so) because the SQL server is not the IIS server where the loading page will be hosted.
Well, you're going to need to create //& install an application on the SQL server.. that allows you to transmit files to it.. Such as an FTP server.
Just basically an application that creates a Server Socket, and allows transmission of a file.
Note, I can't see how you can transfer a file using just HTML -- I'm pretty sure it can't be done.. you'll need to use a CGI language most likely for the transmission. (e.g. PHP, JSP, ASP, ..).
gL,
[r.D]
Just basically an application that creates a Server Socket, and allows transmission of a file.
Note, I can't see how you can transfer a file using just HTML -- I'm pretty sure it can't be done.. you'll need to use a CGI language most likely for the transmission. (e.g. PHP, JSP, ASP, ..).
gL,
[r.D]
ASKER
I did ask this question on the ASP pages but didn't get an answer at all.
I have FTP working to the server but I wanted a solution that would only involve the usering in putting the file without being able to browse or download files from the server. Not for particularly security reasons, just to limit the risk of error and to make it as simple as possible for the user.
Karen
I have FTP working to the server but I wanted a solution that would only involve the usering in putting the file without being able to browse or download files from the server. Not for particularly security reasons, just to limit the risk of error and to make it as simple as possible for the user.
Karen
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you both :-) I actually did it with a simple ftp script in the end which is fairly similar to ERNesbitts solution. I split the points because you have both been great.
Again, thanks
Karen
Again, thanks
Karen
Basically SQL server is not a FTP server.
To upload a file to database
You need to have multipart html form, asp page and database table with blob column to hlod your file in database
http://www.stardeveloper.com/articles/display.html?article=2001033101&page=1