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

Diagnose why ajax upload profiles are shown as applescript #229

Open
brendanheywood opened this issue May 1, 2022 · 2 comments
Open

Diagnose why ajax upload profiles are shown as applescript #229

brendanheywood opened this issue May 1, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@brendanheywood
Copy link
Contributor

This might be an issue in core and not excimer related

image

@brendanheywood brendanheywood added the bug Something isn't working label May 1, 2022
@macgirvin
Copy link
Contributor

This appears to be by design.

lib/classes/filetypes.php:

    /**
     * Given a mimetype - return a valid file extension for it.
     *
     * @param $mimetype string
     * @return string|bool False if the mimetype was not known, a string indicating a valid file extension otherwise. It may not
     *                     be the only valid file extension - just the first one found.
     */
    public static function get_file_extension($mimetype) {

Just above this is an extension to mimetype table that's in alphabetical order and applescript is the first item of type text/plain in the list. I think it was written more for forward lookups (extension to mimetype) and somebody needed a reverse lookup and this is what they came up with. One could probably add a "preferred" attribute especially for going backwards like this, but it would be much less efficient.

@brendanheywood
Copy link
Contributor Author

ok cheers, lets just leave this on the back burner then it isn't critical

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants