Sending file path to controller |
[eluser]minimal design[/eluser]
The way I do it on my site goes something like that: site.com/downloads/get_file/2 where "2" is the id of the file in the DB. All my downloads are stored in the same directory so in your case you might have to store path of file in DB too. Code: function get_file($id) { You should also check out the new file helper... Haven't played with it yet, but it might make things even simpler. EDIT: here's what the model could look like, to give you a basic idea: Code: function get_file_info($id) { |
Messages In This Thread |
Sending file path to controller - by El Forum - 06-03-2008, 05:20 PM
Sending file path to controller - by El Forum - 06-03-2008, 05:26 PM
Sending file path to controller - by El Forum - 06-03-2008, 05:33 PM
Sending file path to controller - by El Forum - 06-03-2008, 05:39 PM
Sending file path to controller - by El Forum - 06-03-2008, 05:41 PM
Sending file path to controller - by El Forum - 06-03-2008, 05:44 PM
Sending file path to controller - by El Forum - 06-03-2008, 05:46 PM
|