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

Add support for MIME type definitions on document types #2154

Open
freakboy3742 opened this issue Feb 13, 2025 · 0 comments
Open

Add support for MIME type definitions on document types #2154

freakboy3742 opened this issue Feb 13, 2025 · 0 comments
Labels
enhancement New features, or improvements to existing features.

Comments

@freakboy3742
Copy link
Member

freakboy3742 commented Feb 13, 2025

What is the problem or limitation you are having?

The current specification for document types lets you define an extension, description and icon for a file type - but doesn't let you define a MIME type. Some platforms (e.g., Windows) require a MIME type definition for file association purposes.

Describe the solution you'd like

It should be possible to define a mime type for a document type:

[tool.briefcase.app.helloworld.document_type.foobar]
description = "A foo bar document"
extension = "fbr"
icon = "icons/foobar"
url = "https://example.com"
mime_type = "text/plain"

Describe alternatives you've considered

Status quo - an autogenerated mime type based on the document type ID and application name.

Additional context

We could do some validation of the mime type; there is a set of known registries that should be the only valid starting text for a mime type (e.g., application/..., text/...).

Once these this is formalised, we should ensure all app templates use the mime type as appropriate.

Originally came from the discussion on #1706, and the implementation in beeware/briefcase-windows-app-template#62

@freakboy3742 freakboy3742 added the enhancement New features, or improvements to existing features. label Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features, or improvements to existing features.
Projects
None yet
Development

No branches or pull requests

1 participant