Jump to content
Server Maintenance This Week. ×

PHP download using $sc->download()


This topic is 4208 days old. Please don't post here. Open a new topic instead.

Recommended Posts

The documentation for the SuperContainer PHP class says there is a method to download files:

$localPath = $sc->download('uploads/12345', '/tmp');

How does one use this? Is it the action of a form from a submit button? A link? Are there any code examples beyond that one line example in the documentation?

I'm building a full doc management solution in PHP using SC. People can click or right-click on the SC <iframe> or <img> to do the download, but a lot of people won't know that. A button to invoke the $sc->download() function would be better.

Also, how does one specify the desktop as destination in cross-platform manner? Use a block like if(Mac), ~/Desktop, else if(Windows)...?

Thanks.

Gary

Link to comment
Share on other sites

  • 2 weeks later...

Gary,

Yes, using User Agents or some derivative of this is one way to handle cross-platform applications. There are some better answers and solutions online that could answer this much better than I can though.

Regards,

Link to comment
Share on other sites

This topic is 4208 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.