-
Notifications
You must be signed in to change notification settings - Fork 112
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
Add support for a custom CodiMD mimetype #1233
Conversation
This is for now hardcoded, still have to parse the appropriate config section.
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@glpatcern can we instead call RegisterMime from the init method of appprovider? Something like adding mime.RegisterMime(".zmd", "application/compressed-markdown")
in
reva/internal/grpc/services/appprovider/appprovider.go
Lines 46 to 48 in 6b143c2
func init() { | |
rgrpc.Register("appprovider", New) | |
} |
Makes sense - and surely we can read the config there in appprovider once it's ready. |
Well if we can add it through appprovider, the whole process becomes much simpler 😁 I'd still like to implement the functionality to pass configs to packages, but that can be put on the backburner for now. I'll create a PR to this branch to enable reading this config. |
Read mimetypes config for appprovider
Yes, I agree that passing configs to packages should be done as a back-burner task. At the same time, with this PR we're saying "new mime types can be defined in the context of the appprovider only", which is fair enough for now but in general that statement could be proven wrong. |
@glpatcern agreed! |
This is for now hardcoded, still have to parse the appropriate config section.