download helper and directory helper question NOW with an additional URI question!

#1
[eluser]nikefido[/eluser]
I am building a file management system using code igniter and I was wondering if I could use the download and directory helper that CI so thoughtfully provides..

My problem is that the files the system uploads are going to be stored outside of the root folder (www aka public_html) -

Since the download helper path/to/file is relative to the index.php...how big of a problem is this? Can I just use a few "../../" to go that far back "behind" the www/public_html folders?

Also, can directory helper be used the same way?

My alternative is to use the apache mod_xsendfile to send the correct headers.

#2
[eluser]nikefido[/eluser]
Well I answered one of my questions:

download helper works with files outside of the www/public_html root.

this is good!

now to test the directory helper...

#3
[eluser]nikefido[/eluser]
looks like directory helper works also. sweet.

Now for my next challenge:

I want to be able to have users follow a link in an email that goes to a function that will let them download a file that outside of the root.

This means using headers (force download - the download helping class).

However, I cannot pass GET parameters to CI, so how could I accomplish this? The URL in the email needs to be able to specific which folder and which user it belongs to (basically, it needs to transfer two pieces of information).

Can I still use the URI in some way??


edit: reading the manual ftw. yay.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.