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

Comments

Projects
None yet
9 participants
@alexholsgrove
Copy link

commented Mar 30, 2017

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Apr 29, 2018

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.

@proimage

This comment has been minimized.

Copy link

commented May 15, 2018

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Dec 4, 2018

Any updates on this?

@adrienne

This comment has been minimized.

Copy link

commented Dec 28, 2018

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

@brandonkelly

This comment has been minimized.

Copy link
Member

commented Dec 28, 2018

Added an extraFileKinds config setting for the next release!

@adrienne

This comment has been minimized.

Copy link

commented Dec 28, 2018

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

@brandonkelly

This comment has been minimized.

Copy link
Member

commented Dec 29, 2018

3.0.37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.