Upload storage for plugin?

2 views
Skip to first unread message

O.J. Tibi

unread,
Oct 15, 2009, 10:10:09 PM10/15/09
to CakePHP User Group Philippines
Hi all,

This is trivial, but is my somkinduva dilemma, I've written a plugin
to host a surrogate CMS for my web app, and now needs an upload
component. Here's my question:

1. If I enable file uploads for this particular plugin, would it be
better to store the uploaded files within the plugin directory for
easier maintenance (plugin uninstall, finding, organization, etc)
2. ...or put the uploaded files in my original upload directory (the
one I assigned for the whole CakePHP app)?

Well, the filenames are stored hashed so I won't have to worry of
filename collisions, but the point here is, in your honest opinion,
where should I put the uploaded files for the plugin?

Cheers,
OJ

Antonio Sibal

unread,
Oct 16, 2009, 1:17:10 AM10/16/09
to cakep...@googlegroups.com
Hi OJ,
I haven't tried using or developing any CakePHP plugins yet, so this
is just what comes to my mind right now :) I think plugins (or the
plugin directory) shouldn't contain any application data. I also
encounter things like these often when I'm not sure what convention to
use (even little things). Often times I just do what comes first and
see what happens :) but yeah I think it will be better if we could
come up with conventions on misc cake stuff that aren't being
discussed anywhere.

Tonio

O.J. Tibi

unread,
Oct 16, 2009, 1:36:29 AM10/16/09
to CakePHP User Group Philippines
Tonio,

Yup, I got your point. I guess it's better to keep app data outside
the plugin directory in general.

Cheers,
OJ
Reply all
Reply to author
Forward
0 new messages