Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plone - Best practice on where to store image and file attachments in pages?

Tags:

zope

plone

We are building an Intranet website using Plone 4.1.3 and would like to know if there is a Plone best practice on storing the files and images that are attached to pages. Our Intranet is more of a collaborative site where users can post News item and other articles. So users will be inserting images (using TinyMCE's insert/edit Image) and attaching files to pages.

Question: where should we ask the users to upload the images and files to? Should we let users upload images and files to the same folder as the page itself? Or should we create a subfolders inside the same folder as the page, called, say, _images and _files, and upload images and files to the _images and _files folders respectively. Or should we create a common top-level folder outside of the parent folder of the page and have our users upload files and images to this top-level folder (maybe to _images and _files subfolders inside this top-level folder). For example, if we have three top-level folders on our Site: News, Finance and Engineering -- and then we have another top-level folder call say Uploads. Users will create pages in say News and when they insert an image in the page using TinyMCE, they will upload to the top-level folder Uploads instead of to the same folder as the page.

The problem with the first approach of storing images and files in the same folder as the page or in a subfolder inside the page folder is that the images and files will be scattered all over the place.
The problem with the second approach of having a top-level folder created just to store all the uploaded images and files is that it does not appear to be the Plone way of doing things - keeping everything related to the page inside the same folder as the page or same parent folder.

Is there a Plone best practice on where upload the images and files to when inserting images (via TinyMCE insert/edit Image button) and file links in a page? What is the Plone way?

Any thoughts?

Thank you very much in anticipation.

like image 871
user1017702 Avatar asked Feb 15 '12 16:02

user1017702


2 Answers

In the 150+ Plone sites I've helped build, I'd say the vast majority wound up using a central "Images" folder. This might not work for a very large site, but I think it is at least a "reasonably good" practice for many sites. I would also say that UID linking is a good idea, since it makes pages quite robust against moves/broken links.

like image 114
Jon Stahl Avatar answered Nov 15 '22 11:11

Jon Stahl


Ah, the image problem ;) You are not alone in this one, everybody who has ever worked with Plone has eventually had the same questions.

Typically we always use either the same folder approach or the global folder approach. The idea of creating image/files subfolders sounds preposterous.

1) The global folder approach is a good one only if the images are shared among items. It also helps if they are somehow organized, otherwise your users will quickly get lost and start reuploading all over again. Jarn's ImageRepository helps quite a bit, but lacks maintenance love. Should work though. 2) Uploading in the same folder as the document is great if you have disconnected users, there is no reuse of the images, and user permissions are scattered all over the site. You also typically hide them from navigation. Concerning the bug, if it is a bug it will be fixed. Did you submit your bug report?

like image 32
ggozad Avatar answered Nov 15 '22 10:11

ggozad