Version 6.4
I have been building a site using the fabulous Perch CMS but discovered that the default upload path for images is inside the perch directory which caused my a bit of concern. Most Perch based sites I have looked at have been happy to use this but to be extra safe I like to change the name of the Perch directory which is easy to do in the config.php file.
define(‘PERCH_LOGINPATH’, ‘/admin’);
However any uploaded files go into the resources directory which is actually inside the Perch directory - thus revealing what you have renamed it. That wasn’t really how I wanted it so I contacted the Perch chaps - very helpful - to see if I could set a path for the uploads outside of the Perch directory.
What they suggested was changing two of the line in the Perch config.php file to include the full path to the directory file and the directory from the root of the site:
define(‘PERCH_RESFILEPATH’, PERCH_PATH . DIRECTORY_SEPARATOR . ‘/Volumes/Drobo/www.mysite,com/
development/20120508/assets/img/content’);
define(‘PERCH_RESPATH’, PERCH_LOGINPATH . ‘/assets/img/content’);
I set this all up as instructed but was getting errors in the control panel - Perch was appending the perch directory - /admin in my example above - on the beginning of the URL for the upload directory giving a path of /admin/assets/img/content- not what was wanted at all!
So I raised the issue with the Perch team again and they gave me some (apparently) undocumented advice to change the two file path lines in config.php to:
define(‘PERCH_RESFILEPATH’, ‘/Volumes/Drobo/www.mysite,com/
development/20120508/assets/img/content’);
define(‘PERCH_RESPATH’, ‘/assets/img/content’);
and that worked a treat!
Read more about Uploading images outside of Perch CMS default resource directory...
Read more about Responsive Web Design break points...
Read more about CSS first-child and IE...
Read more about Aperture tidy up...
Read more about ExpressionEngine custom log-in page...
I recently booked a trip on the Swanage Belle, a steam hauled special from London down to Swanage on the Dorset Coast.
Read more about Swanage Belle...
Steve Jobs was many things to many people. To me he was one of a handful of people who have had a profound effect on my life.
Read more about I never met Steve Jobs...
The UK's first ExpressionEngine conference has taken place in Manchester in August 2011. I provide a report on the event itself and the surrounding activities.
Read more about EEUK11 report...
Assets is a new file management add-on for ExpressionEngine and brings a new way of managing assets in your website. I installed it and built a simple image Gallery.
Read more about Assets for ExpressionEngine...
On the 11th June we attended the Shakey Super Pull run by the Midlands Tractor Pulling Club at the Shakespeare Country Raceway.
Read more about Vintage tractors...
You are invited to comment
You are invited to post comments about this article. I will publish any comments that I think actively further the conversation and I reserve the right to filter out any comments. Comments on this site are free for general discussion but not for promoting businesses. If you wish to link to a commercial business you are welcome to do so and there is a charge of £10.00 per link per day, payable in advance, with a minimum of 30 days. Enjoy the discussion.