Skip to content

Move mimetype alias to route #28974

Closed
Closed

Description

@PVince81

Due to legacy reasons, the mimetype aliases are stored in a JS file that is directly loaded at page load time instead of asynchronously.

Instead of generating it and checking in the file "core/js/mimetypelist.js", we should provide an app framework route to retrieve it asynchronously.

In the JS side, we need to make sure that any app that needs it is using a promise when retrieving this information as it would be retrieved asynchronously instead of being available at page load.

Once this is done, remove the "mimetypelist.js" exclusion from integrity check.

Activity

  1. added this to the backlog milestone on Sep 11, 2017
  2. jvillafanez commented on Sep 11, 2017

    @jvillafanez
    Member

    Copying myself from #28973....

    It might be better to use a custom mimetype list file to override whatever is in the "official" mimetypelist.js file. The idea is similar to what is used in other parts of ownCloud: get the data from the mimetypelist.js file and override or extend that data with the contents of another custom file if needed.
    The mimetypelist.js will keep being hashed while the other custom file won't.

    I didn't take theming into consideration, but anyway, an additional custom file could come in handy. We could have 3 different files: core's mimefiletype.js, the one coming from theming, and the last one from a custom location maybe configured through the config.php file.

    The priority would be: core < theming < custom. This could work because there will be only one active theme, so no competition among themes will happen, and the priorities are quite clear. Anyway, it's something to decide what we'll allow.

    Particularly, I think everything we package should be hashed. Unless the mimetypelist.js can be safely removed from ownCloud, it must be hashed. If the file can be removed without affecting ownCloud, we can say it's a example file that can be edited, but only if this is the case

  3. ownclouders commented on Dec 19, 2017

    @ownclouders
    Contributor

    Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

  4. PVince81 commented on Dec 19, 2017

    @PVince81
    ContributorAuthor

    still valid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions