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

support allowed file types to File URL Replacement feature #146

Closed
ewsopp opened this issue Aug 29, 2017 · 1 comment
Closed

support allowed file types to File URL Replacement feature #146

ewsopp opened this issue Aug 29, 2017 · 1 comment
Assignees
Milestone

Comments

@ewsopp
Copy link
Member

ewsopp commented Aug 29, 2017

Detect the allowed file types that can be uploaded into the WordPress media library, and use that list of file types with the "File URL Replacement" feature.

reference https://codex.wordpress.org/Function_Reference/get_allowed_mime_types

image

@ewsopp ewsopp added this to the v2.1 milestone Aug 29, 2017
alimuzzaman added a commit that referenced this issue Aug 29, 2017
@ewsopp
Copy link
Member Author

ewsopp commented Aug 29, 2017

As @alimuzzaman pointed out via Slack, there may be a performance hit if we add support for ALL allowed file types. Instead, maybe we should add a field that allows the user to manually control the supported file types.

  • When the user enables the "File URL Replacement" setting, display a new field that displays the default supported file types and allow them to customize it.
  • Field default value: jpg jpeg png gif pdf
  • Field description: Define the file types you would like supported. Separate each type by a space.
  • This new field should also be supported by a wp-config constant (WP_STATELESS_MEDIA_BODY_REWRITE_TYPES)
  • and network settings.

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

No branches or pull requests

2 participants