I’m looking to add a secure upload folder that is outside of the web root.
In the URL and Path Settings I have the setting below:-
Default base URL: http://ee6:8888/
Default base path: /Users/wayne/Sites/localhost
I’ve created a folder in the localhost directory called: ee6-assets and setup a new upload directory with the following settings:-
Upload directory: /Users/wayne/Sites/localhost/ee6-assets/
Upload path: {base_path}/ee6-assets/
When I upload a file it get uploaded to the correct folder but it doesn’t show in the modal window when I click on the filename.
Could someone please let me know where I’m going wrong.
Thanks Wayne.
I don’t think that’s possible to do. It will upload the file because PHP can access that location. However, URL returned for that location will never be accessible to the browser because it’s above web root.
Example:
Folder Structure:
├── public_html
| ├── admin.php
| ├── index.php
| ├── images
│ └── themes
└── system
└── uploads
Here, the webroot is /public_html/
and the uploads
folder is above web root ( /uploads
).
The URL for the images folder in public_html
is domain.com/images
, as domain.com
points to /public_html
.
You can not traverse up the folder the tree in a URL, so it’s impossible to access /uploads
via the browser (which is why you move items above web root anyways).
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.