Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

FR: Specify name formats for uploads on entries #2027

Open
lukeagsmith opened this issue Jun 15, 2018 · 2 comments
Open

FR: Specify name formats for uploads on entries #2027

lukeagsmith opened this issue Jun 15, 2018 · 2 comments

Comments

@lukeagsmith
Copy link

Is your feature request related to a problem? Please describe.

Clients suck at naming things. Duplicate, unrelated, and bad names make the assets folder messy, hard to manage and also don't make for semantic, accessible pages with good SEO.

Describe the solution you'd like

The ability to set a format for the naming of upload files with variables taken from the entry they are uploaded against e.g. {{ slug }}--hero, {{ slug }}--floor-plans etc [file extension maintained].

In some instances where you have more arbitrary assets such as gallery images or a bunch of relevant files to download it would be more useful to automatically add these to a sub folder related to the entry e.g. /downloads/{{ slug }}/ and a new sub-folder would be made.

It would also be useful to be able to carry through the original filename if required.

I guess these would be set in the fieldset YAML

my_asset_field:
  type: assets  
  container: downloads
  folder: '/jobs/{{ slug }}'
  filename: 'Acme-Inc__{{ slug }}-job--{{ filename }}'
  restrict: true
@edalzell
Copy link

@lukeagsmith for asset organization, see this

@edalzell
Copy link

also @lukeagsmith this is solvable right now w/ an addon, if it's urgent for you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants