Pods: Customise Plupload Directory

Created on 11 Apr 2013  ·  5Comments  ·  Source: pods-framework/pods

Is there a way of customising where images are uploaded either through a hook or filter? If not can it be added in somehow.

Help Wanted Need Votes Enhancement

Most helpful comment

Reasons:

Attachments for that kind of POD/CPT

  • are not intended to be used somewhere else on the Wordpress site
  • should be handled more private, e.g. with htacess rules for that folder that checks some things..
  • should not be added to the imagesitemap / published
  • should be archived in another folder structure to be reused for other purposes.
  • are no images but zip files, pdf, etc...

by the way: it could be the normal upload directory if that can fit the requirements...

All 5 comments

Cool idea, let me think on it and see if there's a way to do this through Pods or if it will be strictly dealing with WP itself.

Yes I thought doing it through pods would be awesome, but if I could do
it through hooks and filters then that would be cool as well especially
if I wanted it to apply to more than one fields of a paticular pod :)

+1
i am currently looking for an option to move files uploaded outside the default media directory.
i already tryed some hools like wp_handle_upload_prefilter without success

What's the use case here? Our image uploads integrate with the media library, so all images end up saved as attachment post types and then located via WordPress's normal facilities. Saving loose files from potentially untrusted sources in a location outside WordPress's designated uploads directory seems like a bad idea unless there's a very compelling reason.

Reasons:

Attachments for that kind of POD/CPT

  • are not intended to be used somewhere else on the Wordpress site
  • should be handled more private, e.g. with htacess rules for that folder that checks some things..
  • should not be added to the imagesitemap / published
  • should be archived in another folder structure to be reused for other purposes.
  • are no images but zip files, pdf, etc...

by the way: it could be the normal upload directory if that can fit the requirements...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

szepeviktor picture szepeviktor  ·  18Comments

portlandian picture portlandian  ·  26Comments

PodsBot picture PodsBot  ·  21Comments

GaryJones picture GaryJones  ·  46Comments

brucevdkooij picture brucevdkooij  ·  20Comments