We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Limit file field on publish tab to specific directory.

Development and Programming

Triad's avatar
Triad
44 posts
12 years ago
Triad's avatar Triad

Hi Guys,

I have a custom module, and I need to add an upload field to our module tab.

In actual fact, I have the file field working already, and its uploading, and its saving the file location as it should be.

I do however, need to limit the file field to upload to a specific directory that is set up in file upload preferences. Was looking around for something that might give me an indication on how I need to set this up, but have not had much luck.

Hoped someone might be able to point me in the right direction.

       
Triad's avatar
Triad
44 posts
12 years ago
Triad's avatar Triad

Found my own solution.

Rummaging through content_publish I established that if you include

[allowed_directories] = x

In the settings for the file field, then it sorts itself out.

Hope this helps someone in future.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.