Jump to content

Image "uploaded by" information


Pete
 Share

Recommended Posts

Hi guys

I'm reasonably sure that PW doesn't store this at present, but I just had someone ask me if I could build a website (yes) with a central gallery (yes) and the option of user galleries (yes, all easy enough).

What I did think of though was that it would be nice to have the option of creating a simpler user gallery - in this case the client would be happy enough if everyone simply uploaded images to the central gallery and the individual user galleries were just based off photos uploaded by particular users to the central gallery.

The only issue is that PW doesn't appear to track who's uploaded an image. Is it possible to add the user id to image and file fields in a future release and have it as a searchable field as well?

I was also thinking with my admin hat on for a second, and thought that if you have a collaborative team working on a website and someone gets a bit disgruntled and starts uploading nasty images or files etc then it would also be very useful to be able to find out who'd done it, otherwise you could have a real headache tracking down the culprit. 99% of the time this would never happen on a collaborative website and I've not come across it before, but might be worth adding anyway just in case. Much less likely in business situations and organised clubs/groups, but still a possibility.

It's not about not trusting the people you work with, but having the tools necessary to resolve a potential issue quickly :)

Link to comment
Share on other sites

The images/files really aren't meant to function independently of a page. All of their ownership comes from a page. As a result, I would suggest maintaining a page for each image, and PW is designed for this. For instance, you wouldn't want an image field to have 1000 images on it because that's going to be really difficult to manage without pagination and such. But if you are using pages as images, no problem. To put it another way, pages can scale indefinitely, but file/image fields aren't intended to at present.

As for keeping track of which admin user uploaded a particular image/file, that certainly makes sense. Though it also makes sense with any kind of field. The current plan is that we'll be keeping track of this stuff with a page revision manager and logs, so that you can have a history of all page edits and be able to see where every edit came from (and revert to it if you want). This is actually already functional, but hardly production ready so I'm continuing to work on it and targeting it for v2.3.

Be cautious dealing with public data input, especially files. PW isn't designed to have it's admin tools exposed to untrusted users. The needs for anonymous/public data input are different from admin input. For instance, image uploads really need to have original files quarantined (not web accessible) and only processed/resampled versions of images web accessible. Yet this would be a counterproductive approach for admin needs. PW's fields are designed for administrative and trusted users. Uploaded files go right into the /site/assets/files/ directories and not into a quarantine area. As a result, when I'm implementing some kind of public file upload on a site, I usually write the code for that with security specific to the need–it usually involves a quarantine area and babysitting the uploads. :)

Link to comment
Share on other sites

Cheers ryan, that makes sense. I keep forgetting pages aren't really pages in the conventional sense and that having lots of them doesn't mean it's a bad thing.

EDIT: In fact, as there will only be one main gallery on this particular site and it would only be users adding images, I suspect the easiest thing to do would be to simply add an Images field to the Users template and do it that way.

Link to comment
Share on other sites

EDIT: In fact, as there will only be one main gallery on this particular site and it would only be users adding images, I suspect the easiest thing to do would be to simply add an Images field to the Users template and do it that way.

Clever solution! Shows again how brilliant idea it was from Ryan to treat users as pages.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...