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

feat: add mimetypes to nextcloud core #78

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tnyeanderson
Copy link

Fixes: #26

I've opened a PR for nextcloud server which adds the drawio mimetypes upstream to prevent code signing errors.

The above issue was locked to collaborators due to excessive "+1" posts, but this stopped the implementation conversation as well.

This PR prevents the installer from copying the SVG mimetype icons.

TODO

Where in the code does the core/js/mimetypelist.js file get manipulated? I'm not familiar with the nextcloud interfaces, but that will need to be removed as well.

@m-mohamedin
Copy link
Contributor

Thanks for the PR
Both the images and mimetype additions are handled in the same file:
/lib/Migration/RegisterMimeType.php

See registerForExistingFiles and registerForNewFiles

Let us know if you have any other questions

@tnyeanderson
Copy link
Author

I saw those functions, they are adding the mime types to the correct files, which are mimetypemapping.json and mimetypealiases.json. Those will not cause the code signing errors, if I understand the situation correctly.

However, on my system, the mimetypelist.js also has the drawio MIME types in it, which is what triggers the error and the problem.

I'm trying to understand how my mimetypelist.js file got changed, and I haven't seen any mention of that file in the entire git history of the repo (perhaps it's an imported constant?). Any ideas?

@jgraph jgraph deleted a comment from tnyeanderson Aug 11, 2024
@m-mohamedin
Copy link
Contributor

I saw those functions, they are adding the mime types to the correct files, which are mimetypemapping.json and mimetypealiases.json. Those will not cause the code signing errors, if I understand the situation correctly.

However, on my system, the mimetypelist.js also has the drawio MIME types in it, which is what triggers the error and the problem.

I'm trying to understand how my mimetypelist.js file got changed, and I haven't seen any mention of that file in the entire git history of the repo (perhaps it's an imported constant?). Any ideas?

Sorry for the delay, I wanted to dig deeper but I'm still busy
Unfortunately, I don't know how the file is changed, but these two functions do it afaik (code is copied from mindmap )

@raxetul
Copy link

raxetul commented Sep 30, 2024

Are these images important? What are they used for?

@tnyeanderson
Copy link
Author

They are the thumbnail images used to represent items of the given MIME type

@m-mohamedin
Copy link
Contributor

@tnyeanderson Are you blocked by us? I hope I answered all your questions

Mindmap added their mimetypes in this PR and commit, I think nextcloud has a standard process to add a new type but I forgot where I read about that:

nextcloud/server#27989
nextcloud/server@efb3481

@tnyeanderson
Copy link
Author

At this point, i suspect that once the stuff is added upstream and this is merged, things will be fine again (maybe this is a quirk of my system which is many years old and has been through many updates--who knows).

I'll work on finalizing the upstream PR so this can be merged. Sorry for my delay

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

Successfully merging this pull request may close these issues.

Core check fails after installing the app
3 participants