Forum
Perch Buckets
I believe that I have a slight issue in the way I'm trying to implement Buckets. I changed the config file so now all files are being loaded to a root folder on my server called _fileUploads. That worked out well so no issues here.
Next I was hoping that when a client uploaded images from the CMS it would go into a sub-folder of the _fileUploads directory. So I added the following markup to my template.
<img src="<perch:content type="image" id="image" label="Image" bucket="staffPics"/>" style="width:250px; float:left;" alt="<perch:content type="text" id="staffTitle" alt" label="Staff Title" required="true" />" />
Below is my buckets.php file which is uploaded in the config folder
<?php
return array(
'staffPics' => array(
'web_path' => '_fileUploads/staffPics',
'file_path' => '/home/floridat/public_html/_fileUploads/staffPics'
),
'mainPics' => array(
'web_path' => '_fileUploads/mainPics',
'file_path' => '/home/floridat/public_html/_fileUploads/mainPics'
),
'pdfs' => array(
'web_path' => '_fileUploads/pdfs',
'file_path' => '/home/floridat/public_html/_fileUploads/pdfs'
),
'blogPics' => array(
'web_path' => '_fileUploads/blogPics',
'file_path' => '/home/floridat/public_html/_fileUploads/blogPics'
)
);
?>
All file uploads are in the _fileUploads directory but not in a different directory and the system isn't applying the uploaded image into the specified bucket. I'm fairly certain it is user error, but I can't figure it out so I figured I would see if anyone had an answer.
I think you web paths need to be root-relative:
Thanks Drew I made that change and uploaded everything.