-
Notifications
You must be signed in to change notification settings - Fork 43
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
Treat file types consistently across all components #842
Comments
Is there a case for a more naive implementation of mapping common MIME types to "printable" (and maybe "viewable"), without the application context, so that the SecureDrop Client can offer the print/open options only when appropriate? If I understand correctly, this would imply more ongoing maintenance of that list to ensure that changed application capabilities are accurately reflected, but it doesn't seem to me that those capabilities are changing so rapidly that it's necessarily a large maintenance burden. |
If we would would prefer to to manually maintain a list of mime types, I'm OK that. However, I don't think the automation part about the application awareness would add a lot more effort to the core of what I think we need: my main concern is that how we handle files is spread across different repos and packages, there's no integration. I think we want integration between |
If we agree on the format of the file(s), we could fix freedomofpress/securedrop-client#918 using a manually maintained list, then follow up to generate the file automatically as a transparent improvement. |
One additional thing to consider is the evenutal support for bulk actions (bulk export, but maybe also bulk print?), which will send an archive containing (potentially) many filetypes to sd-devices [sd-export] for print or export. For this, the correct print behaviour per filetype might need to live in the vm responsible for printing, rather than sending a long config file with each submission and the action to take with it. But I guess you're saying that if the client were aware of the supported actions, those could be passed to sd-devices, rather than reimplemented in sd-devices? |
It seems to me that it could be considered responsibility of the Client to only send for printing files that are printable etc. From that point of view, I think the purveyor of service ( |
My intuition would be to approach this problem as follows:
To update the list, we would build and release a new Does that approach seem viable for managing/updating this config & querying it, or am I overlooking significant drawbacks, use cases, or logic problems? |
In response to how we figure out which files get converted to PDF for printing as well as other conversations about the client's current inability to distinguish which files can be printed and which cannot, this conversation happened:
Because it affects multiple components of the system, I thought this was the best repository to track this discussion.
Status quo
securedrop-export
, an operation mostly irrelevant to this conversation.securedrop-export
, which prints anything if given the instruction viametadata.json
.securedrop-export
's print action does not care about file types other than a file suffix list that decides whether LibreOffice is used to convert a file to a PDF before it's handed off to the printing panelsd-viewer
) makes all the decisions as to what to do with that file via our ownmimeapps.list
filesHigh level "ideal" (proposed)
mimeinfo.cache
?)securedrop-client
andsecuredrop-export
, as well assd-viewer
'smimeapps.list
ought to be able to use that information to make the correct decisions for their respective responsibilitiesAn effect of the above would that if for example
eog
would add native.webp
support (see #614), we would inherit this automatically instead of having to keep track of it and merge/release changes to support it as well.Possible implementation
While
sd-devices
andsd-viewer
are currently based on the large template that has LibreOffice installed somimeinfo.cache
ought to have the right kind of information to work with already,sd-app
is based on the small template so would need some way of being "informed" of what is supported by which application in the large template. @zenmonkeykstop pointed out that this only needs to be done when updates are run, so this may be relatively easy to pull off.sd-large-*-template
that readsmimecache.info
data and picks out mime type/application pairsjson
🤷) that can be ingested bysecuredrop-client
(e.g.{'print': ['application/rtf', 'application/pdf', …], 'view': ['video/ogg', …]}
)mimeapps.list
forsd-viewer
json
file forsecuredrop-client
over tosd-app
. Ideally, this would happen after updates have run onsd-large-*-template
but before the VM is shut down (though that may not be entirely feasible at the moment)securedrop-export
to make a call whether to convert a file with LibreOffice before it is sent off to the printer or not.Comment
While the "ideal" here sounds nice in theory, I am certain there's edge cases that aren't accounted for yet. Example:
message/rfc822
(see freedomofpress/securedrop-client#2158) would be associated with Thunderbird (if that was installed), and would likely not open the way that we'd want it to, or any compressed archive which we probably want special handling for in any case.Overall, this issue intends to kick off a conversation, since it'd touch a lot of different components at the same time and is an example of something we'd want deeper understanding of across the team before we move on it.
References
Client: freedomofpress/securedrop-client#918
The text was updated successfully, but these errors were encountered: