I'm creating an image uploader which will give the user an option to upload file to a different server than which the script is hosted on.
Is making an FTP connection from the script server to the target uploading server the only way to do this ?
Correct me if im wrong, but would the path of the file look like this ?
User computer (file) ---> script server ----> target server
Is there another way to do this ?
Is there another way to do this ?
Apart from uploading it twice from the user's computer, I don't think there is.
There's FXP but it is usually disabled on shared hosting in my experience.
In a specialized environment, you could do something with IP multicast, but it's unlikely to work in general.
cURL supports FTP. You should be able to connect to your FTP servers and upload the file.
Related
I have a simple php local sever with xampp,
Ftp Server with included fileZilla.
I have designed a site to upload files is there a way to upload files directly to ftp from my site without first uploading it to the server? Currently in using the normal html form go upload the file.
The form doesn't upload large files.. I tried with a 350mb file and the connection timed out..
Is there a way to upload the file to ftp server directly from the website (no 3rd party software on client)
UPDATE (29/13/17)
My problem was solved by using php only. I can upload large files now.
How ever the question is still unanswered.
In your ftp its easy to upload files. You can see a tutorial from youtube like
In this tutorial using filezilla. Its fine ftp softwere
I'm not sure how common my request is but here goes:
I have a client who wants to be able to receive files of up to 2GB in size from their customers. The reason why the files are kind of big is because they are graphic design files. Ideally, they would have their customers transfer their files via FTP using an FTP client like Filezilla. However my client has stated that they spend way too much time trying to school people on how to enter FTP credentials into an FTP program and the concept of FTP in general.
So ultimately my client has stated that they would like the customer to be able to use a web interface, which they're already familiar with, to be able to accomplish the same task. For example, they'd like the customer to be able to use a form and hit an upload file button. Simple as that.
At this point I should state that I'm working on a WordPress site on top of a Rackspace Cloud Sites server (shared hosting).
I'm using a WordPress plugin that allows me to do this and it works for small files but not for files approaching 500MB. After speaking to a RS Cloud tech support person I've narrowed it down to the temporary directory /tmp/ in the Apache server. That is the server is not able to write large files into that temporary directory because of their server wide restrictions. That is, they cannot change this to accomodate my needs. They said I would need a dedicated server for that, which, is not an option for me.
After doing some thinking though, I've come to the conclusion that it's silly for me to have to upload a file to the server's temporary directory, only to move the file to the ftp server. So this brings me to my question: is it possible for a web based PHP script to send the file directly from the user's machine, bypass the web server, and send it directly to the FTP server?
If not, do you have any other suggestions? Any help would be appreciated. Thanks.
No, it's not possible at all.
My suggestion? Search and learn how to use HTML5 upload for large files.
Its seams like someone find solution for your problem. Please refer to this question:
Stream FTP download to output
The question was how to stream/pipe file from FTP thru HTTP to the user's browser.
It seams like the answer from #strager is what you need.
I am maintaining two local servers on local network (within the office premises).
One is the server where my php files are being located and another server is a File Server where I want to store all the uploaded files.
As the second one is a file server so there should no need to install php on that server.
How I can upload the files to another server. I have the full rights to access the file server. I tried to use ftp_connect() method. But that is not working in Intranet however, it is perfectly working with any live server ftp credentials.
If I use CURL then I have to install PHP on my file server, but that is not a good practice. So how I can upload the files using php ftp related methods?
How I can upload the files to file server. Thanks in advance.
Since in your case both client and server are Unix systems, the easiest is to mount a directory of the file server on the web server by NFS. This way you can upload files by copying or moving them locally, no need to muck around with FTP or SSH modules in PHP.
Actually, i have opened a site in a free web hosting company which is not offering file sharing facility (i.e. to store files in different formats) so online chat community of d same site advised me to store the files in a remote server of sites such as rapidshare.com, mediafire.com. But i need downloading and uploading facilities in my website. So i have decided to run uploading and downloading php scripts frm my website which will be connected to the remote server, but i'm afraid scripts are not working. As my user name in mediafire is "karthik_raju1#yahoo.com" when executing the code with this user name i have got an "Error:username must not contain '#' symbol". Can u please suggest me d code to upload files to remote server and kindly suggest me some important tips ,if any...
If you are wanting to store other files, a simple solution would be to consider a better free host such as 000webhost.com or byethost.com or awardspace (This is not an advertisement).
Is there a way to upload files directly from the server itself where the site is hosted.
I really want to do that way cause all my old photo files are on the server and I want my uploadify to do grab those files directly from that server location specified.
This will need frequently for my future use.
please give a solutions if uploadify support the same
Uploadify works just one direction: client -> server. You simply can use ftp or sftp to download your photos if that task you only need to do once.