Forum Moderators: coopster

Message Too Old, No Replies

Uploading file into my FTP through godaddy

         

Gowri pandiyan

8:33 am on Feb 12, 2016 (gmt 0)

10+ Year Member



Excuse me in case if this question sounds foolish :).

I have a godaddy domain and own FTP, what I would like to do is to store submitted files from a form from my website to my FTP via my godaddy domain.

For instance, let's say this is my domain in godaddy "http://www.example.org" and I have my FTP credentials ex Host = eabc.org, username and password. while submitting a form in my website, It will post a file to my godaddy domain, from godaddy the submitted file should be stored in a folder created in my ftp.

To achieve the above, the below is the code I use to post file to my godaddy domain

<form action="example.org"; method="POST" enctype="multipart/form-data"> <input type="file" name="image" /> <input type="submit"/> </form>

I know it can be done by PHP, but I would like to know if there is any properties/settings in godaddy to store this posted file in my own FTP

whitespace

11:54 am on Feb 12, 2016 (gmt 0)

10+ Year Member Top Contributors Of The Month



FTP (File Transfer Protocol) is a protocol/method by which files can be sent across the internet. It is not a "storage area" in itself. What you are referring to is simply the storage space provided by your hosting account.

By constructing an HTML form to allow uploads to your website, the files will be transferred over HTTP (not FTP). I've not used GoDaddy, however, there shouldn't be anything you need to configure in order to allow file uploads. However, there might be an initial limit on the size of the file that you can upload. This might be configurable on your server or in your PHP script - this could depend on your hosting account.

As well as the HTML form, you'll need a PHP script (which you could write yourself) to manage the upload. This includes copying the file from a temporary upload location (controlled by your server) to the folder on your filesystem where the file should go (that you have created in your FTP client). You need to make sure that the PHP script has permission to write to this folder.

You also need adequate validation to ensure only authorised users can upload files and/or that the uploaded file(s) are of the correct type. This is obviously an important security measure! If you don't fancy getting into the security side then there may be a premade scripts that will do the job, or act as a base.

Gowri pandiyan

8:23 am on Feb 15, 2016 (gmt 0)

10+ Year Member



Great! Thanks for the details explanation! I will surely try as you suggested