views:

190

answers:

1

Hi,

I have a quick question about how to serve data from a repository in a application that I am writing using the Zend Framework.

My current structure is:

/application
/filespool
/library
/public

In the filespool are a number of user identifiable folders that contain user content that is uploaded via forms, mainly jpg/png and pdf. This causes issues when trying to display an image back to the user as the path in my db to reference the file is:

../filespool/0/0/1/image.jpg

which I can't display in the view script as it can't reference the image.

What would be the best way of adding the image to the view script when trying to display it back to the user? I thought about adding the filespool folder to under public but would rather leave it where it is, as that move would require a lot of work to refactor the changes.

Thanks in advance...

A: 

i guess you could try 2 diferent things ( actually just one )...

  1. use htacces to make a virtual directory for the file pool using rewrite ( not working )
  2. make a php file in the public directorry that takes a parameter with the path and serves the files

EDIT Spoke to soon ... you cant use htaccess ... and that is because its outside your document root so the server cant serve files from there.

solomongaby
Ok struggling with option 1. Not used htaccess much so new to it. any pointers on the Rule?
Grant Collins