Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow file kinds to be extended #1584

Closed
alexholsgrove opened this issue Mar 30, 2017 · 9 comments
Closed

Allow file kinds to be extended #1584

alexholsgrove opened this issue Mar 30, 2017 · 9 comments
Assignees
Labels
assets 📁 features related to asset management enhancement improvements to existing features

Comments

@alexholsgrove
Copy link

Description

See this stackoverflow post
I have added extra file extensions to my allowed uploads list in the config file, but the "kind" property is returned as "unknown"

Steps to reproduce

  1. Add extra file types in the config file 'extraAllowedFileExtensions' => 'bim, dwg, rvt'
  2. Loop through the list of uploaded assets on a template and try to access {{ asset.kind }}

Additional info

  • Craft version: 2.6.2958
  • PHP version: 5.6
  • Database driver & version: MySQL
  • Plugins & versions: n/a
@23d1
Copy link

23d1 commented Jul 7, 2017

It would be good if this was revealed in the admin as an additional checkbox in the allowed file types list as well.

@proimage
Copy link

Something like this would be awesome (I may be using the wrong brackets, but you get the idea):

'extraAllowedFileExtensions' =>
[
   'css': 'Stylesheet',
   'hl3': 'Half-Life 3'
]

Then the "Restrict allowed file types?" section would add checkboxes for any additional type specified there.

@brandonkelly brandonkelly added the assets 📁 features related to asset management label Apr 29, 2018
@andris-sevcenko andris-sevcenko self-assigned this Apr 30, 2018
@proimage
Copy link

One more thought occurs to me regarding this. There should be a way to add more than one extension to a single checkbox. Perhaps:

'extraAllowedFileExtensions' =>
[
   'css': 'Stylesheet',
   'hl3': 'Half-Life 3',
   'hl3-map': 'Half-Life 3', // The "Half-Life 3" checkbox would cover both .hl3 and .hl3-map extensions
   'twig': 'HTML' // would add .twig files to the built-in/native "HTML" checkbox
]

@Bshally
Copy link

Bshally commented Sep 28, 2018

I'm also running into this issue. Need to add .dwg and other technical drawing files to the assets as well.

@swixpop
Copy link

swixpop commented Dec 4, 2018

Any updates on this?

@adrienne
Copy link

This is an old feature request, @brandonkelly, @angrybrad, but i'd like to put in an emphatic +1 for it.

@brandonkelly
Copy link
Member

Added an extraFileKinds config setting for the next release!

@adrienne
Copy link

@brandonkelly - one question: will this be going into the 3.0.x branch or not until the 3.1 release?

@brandonkelly
Copy link
Member

3.0.37

@brandonkelly brandonkelly added the enhancement improvements to existing features label Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assets 📁 features related to asset management enhancement improvements to existing features
Projects
None yet
Development

No branches or pull requests

9 participants