Jump to content

use code to download a file to my computer


Gilbert
 Share

Recommended Posts

I'm not sure where to post this - i hope someone can help me.

I have a process where I do some of my work on my website and then i do some on my computer.  I am using an FTP client on the computer so that when i change a file it automatically updates to the website and it works like a charm.  I would think you'd be able to just reverse the process to download a file from the web server to my computer, but I can't seem to make it happen.  I know about the <a> download attribute and that has worked, but if I am on the website with my phone and I hit that button, it  downloads to my phone when I want it to download to my computer so that I can use it there.  I would like to be able to have a button on the website that will always download a certain file to my computer every time instead of doing it manually because another user may be the one clicking the button.  Can someone steer me in the right direction or send me some code that would do that (javascript or php preferable).  Thank you so much if you can help.  I'm pulling my hair out reading all about it and can't seem to find the right answer.

Link to comment
Share on other sites

Thanx for the input, dsonesuk.  I have tried downloading to cloud storage, but I wanted it to be a one step procedure with no manual moving of files; just one click on the website and it's all done.  Do you think what I am asking is not doable?  I'm going to keep fishing around for something to do this.  Thanks

Link to comment
Share on other sites

You don't move files? you access the cloud via link and access specific directory directly.

There is no-way to download to a different device, you need a single point of reference to download to, that can be accessed by both devices.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...