4

We are working on a site with 350 or so businesses. They are able to upload 5 photos and a logo to their front-end profile. It would be nice (for organization-sake) if they could upload images into their own subdirectory. "/images/members/{member_name}/image.jpg"

Is there any way to achieve this? less manually creating 350 upload directories...

Currently using P&T Assets.

  • I'm curious to see if anyone suggests building out an extension for this and which hook they would suggest using. I think you'd probably need to elaborate on which member mod you are using and how they are able to upload their photos & logo. – Natetronn Nov 28 '12 at 8:21
  • We are using Profile:Edit. – Dan Johnson Nov 28 '12 at 18:29
  • Dan, what did you end up using as a solution for this? – Nutmeg Aug 23 '13 at 1:03
  • We ended up using channel images, which creates a subdirectory per entry. However, we couldnt get the functionality of giving the directory a custom name or name based on entry title. So the path would be "images/member-uploads/{entry_id}/imageName.jpg" – Dan Johnson Aug 28 '13 at 17:14
6

If a member is a channel entry (or tied to a channel entry) and you are open to using an add-on other than Assets, then Channel Images would be a good route. It automatically creates a separate upload subdirectory per entry. But it uses entry_id for the name of the subdirectory, so wouldn't quite be the setup you wanted for the subdirectory name.

  • 3
    We did this on instaar.colorado.edu for all the people profiles and basically, in the field instructions atop the Safecracker form they use to edit their profile, told them what folder to look in for their uploaded images. Works fine. cl.ly/image/2u3n002D2S2X – Chad Crowell Nov 28 '12 at 7:28
  • 1
    Nice site Chad. Im just north of Boulder. Thanks for sharing. – Dan Johnson Nov 30 '12 at 14:48
2

Brandon of P&T put out this extension for Wygwam a while back. It could be a place to start looking for appropriate hooks to accomplish this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.